summaryrefslogtreecommitdiff
path: root/libstd/sys+plan9-x64.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-01-01 13:11:38 -0800
committerOri Bernstein <ori@eigenstate.org>2015-01-01 13:11:38 -0800
commitecff997d01c7a7c5c74a08fda15dc2fedcc8a0af (patch)
tree5488ebdb42102188b81d6f2ffbe8a1c46f632bc9 /libstd/sys+plan9-x64.myr
parent59d77e008cc4a36eeb2a9d255a32866901b6ccb1 (diff)
downloadmc-ecff997d01c7a7c5c74a08fda15dc2fedcc8a0af.tar.gz
Fix stat and getsysinfo.
Stat wasn't giving the length of the buffer to a() Getsysinfo() was using the wrong env var.
Diffstat (limited to 'libstd/sys+plan9-x64.myr')
-rw-r--r--libstd/sys+plan9-x64.myr8
1 files changed, 4 insertions, 4 deletions
diff --git a/libstd/sys+plan9-x64.myr b/libstd/sys+plan9-x64.myr
index 06ea1f8..7a7a539 100644
--- a/libstd/sys+plan9-x64.myr
+++ b/libstd/sys+plan9-x64.myr
@@ -202,10 +202,10 @@ const segfree = {va, len; -> syscall(Syssegfree, a(va), a(len))}
const segflush = {va, len; -> syscall(Syssegfree, a(va), a(len))}
const unmount = {name, old; -> syscall(Sysunmount, cstring(name), cstring(old))}
const errstr = {buf; -> syscall(Syserrstr, p(buf), a(buf.len))}
-const stat = {name, edir; -> syscall(Sysstat, cstring(name), a(edir), a(edir))}
-const fstat = {fd, edir; -> syscall(Sysstat, a(fd), a(edir), a(edir))}
-const wstat = {name, edir; -> syscall(Syswstat, cstring(name), a(edir), a(edir))}
-const fwstat = {fd, edir; -> syscall(Sysfwstat, a(fd), a(edir), a(edir))}
+const stat = {name, edir; -> syscall(Sysstat, cstring(name), p(edir), a(edir.len))}
+const fstat = {fd, edir; -> syscall(Sysstat, a(fd), p(edir), a(edir.len))}
+const wstat = {name, edir; -> syscall(Syswstat, cstring(name), p(edir), a(edir.len))}
+const fwstat = {fd, edir; -> syscall(Sysfwstat, a(fd), p(edir), a(edir.len))}
const mount = {fd, afd, old, flag, aname; -> syscall(Sysmount, a(fd), a(afd), cstring(old), a(flag), cstring(aname))}
const pread = {fd, buf, off; -> syscall(Syspread, a(fd), p(buf), a(buf.len), off) castto(size)}
const pwrite = {fd, buf, off; -> syscall(Syspwrite, a(fd), p(buf), a(buf.len), s(off)) castto(size)}