summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-06-20 17:39:49 -0400
committerOri Bernstein <ori@eigenstate.org>2014-06-20 17:39:49 -0400
commit49a1983f6bea2adfbc49056ef0fec723c37f08bb (patch)
tree4642e99c1e58dd59b25959cd6e2a39eb631b47c2
parent3ecbc6e0019640b5075f7335233dd01f59ae693f (diff)
downloadmc-49a1983f6bea2adfbc49056ef0fec723c37f08bb.tar.gz
add lstat() syscall
-rw-r--r--libstd/sys-linux.myr5
1 files changed, 3 insertions, 2 deletions
diff --git a/libstd/sys-linux.myr b/libstd/sys-linux.myr
index 4115347..3d90867 100644
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -498,6 +498,7 @@ pkg std =
const write : (fd:fd, buf:byte[:] -> int64)
const lseek : (fd:fd, off:uint64, whence:int64 -> int64)
const stat : (path:byte[:], sb:statbuf# -> int64)
+ const lstat : (path:byte[:], sb:statbuf# -> int64)
const fstat : (fd:fd, sb:statbuf# -> int64)
const mkdir : (path : byte[:], mode : int64 -> int64)
const ioctl : (fd:fd, req : int64, args:... -> int64)
@@ -586,8 +587,8 @@ const open = {path, opts; -> syscall(Sysopen, cstring(path), opts, 0o777) castt
const openmode = {path, opts, mode; -> syscall(Sysopen, cstring(path), opts, mode) castto(fd)}
const close = {fd; -> syscall(Sysclose, fd)}
const creat = {path, mode; -> syscall(Syscreat, cstring(path), mode) castto(fd)}
-const read = {fd, buf; -> syscall(Sysread, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
-const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
+const read = {fd, buf; -> syscall(Sysread, fd, buf castto(byte#), buf.len castto(size))}
+const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(byte#), buf.len castto(size))}
const lseek = {fd, off, whence; -> syscall(Syslseek, fd, off, whence)}
const stat = {path, sb; -> syscall(Sysstat, cstring(path), sb)}
const fstat = {fd, sb; -> syscall(Sysfstat, fd, sb)}