[PATCH] Add readlink syscall
[Thread Prev] | [Thread Next]
- Subject: [PATCH] Add readlink syscall
- From: Ryan Gonzalez <rymg19@xxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Thu, 3 Aug 2017 14:06:05 -0500
- To: myrddin-dev@xxxxxxxxxxxxxx
- Cc: Ryan Gonzalez <rymg19@xxxxxxxxx>
--- lib/sys/sys+linux-x64.myr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sys/sys+linux-x64.myr b/lib/sys/sys+linux-x64.myr index 627974b9..e2646337 100644 --- a/lib/sys/sys+linux-x64.myr +++ b/lib/sys/sys+linux-x64.myr @@ -807,6 +807,7 @@ pkg sys = const rename : (from : byte[:], to : byte[:] -> int64) const creat : (path:byte[:], mode:int64 -> fd) const unlink : (path:byte[:] -> int) + const readlink : (path:byte[:], buf:byte[:] -> int64) const read : (fd:fd, buf:byte[:] -> size) const pread : (fd:fd, buf:byte[:], off : off -> size) const write : (fd:fd, buf:byte[:] -> size) @@ -941,6 +942,7 @@ const close = {fd; -> syscall(Sysclose, a(fd))} const creat = {path, mode; -> (syscall(Syscreat, cstring(path), a(mode)) : fd)} const rename = {from, to; -> syscall(Sysrename, cstring(from), cstring(to))} const unlink = {path; -> (syscall(Sysunlink, cstring(path)) : int)} +const readlink = {path, buf; -> syscall(Sysreadlink, cstring(path), (buf : byte#), a(buf.len))} const read = {fd, buf; -> (syscall(Sysread, a(fd), (buf : byte#), a(buf.len)) : size)} const pread = {fd, buf, off; -> (syscall(Syspread64, a(fd), (buf : byte#), a(buf.len), a(off)) : size)} const write = {fd, buf; -> (syscall(Syswrite, a(fd), (buf : byte#), a(buf.len)) : size)} -- 2.13.3
Re: [PATCH] Add readlink syscall | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: [PATCH] Add set/getuid and set/getgid syscalls
- Next by Date: Re: [PATCH] Add set/getuid and set/getgid syscalls
- Previous by thread: Generating Syscalls, or Holy Sweet Jesus, We Support All of FreeBSD.
- Next by thread: Re: [PATCH] Add readlink syscall
- Index(es):