summaryrefslogtreecommitdiff
path: root/lib/std/syswrap+posixy.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-06 23:40:07 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-06 23:40:07 -0700
commite9e1587410a24b8ae4de292296ed441bddb98f4b (patch)
treeaf73c376079d8ae2d578d17572a233588cf2c456 /lib/std/syswrap+posixy.myr
parent983a758d3127bf5d861227e6a9c56900bf6e2da8 (diff)
downloadmc-e9e1587410a24b8ae4de292296ed441bddb98f4b.tar.gz
Change mkpath API a bit.
We want to pass through modes and handle errors properly.
Diffstat (limited to 'lib/std/syswrap+posixy.myr')
-rw-r--r--lib/std/syswrap+posixy.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/syswrap+posixy.myr b/lib/std/syswrap+posixy.myr
index 393a55f..6dea9c5 100644
--- a/lib/std/syswrap+posixy.myr
+++ b/lib/std/syswrap+posixy.myr
@@ -52,7 +52,7 @@ pkg std =
const getsysinfo : (si : sysinfo# -> void)
/* path manipulation */
- const mkdir : (path : byte[:], mode : int64 -> int64)
+ const mkdir : (path : byte[:], mode : int64 -> errno)
const remove : (path : byte[:] -> bool)
const chdir : (path : byte[:] -> bool)
@@ -83,7 +83,7 @@ const seek = {fd, delta, whence; -> check(sys.lseek(fd castto(sys.fd), delta cas
const dup2 = {ofd, nfd; -> check(sys.dup2(ofd castto(sys.fd), nfd castto(sys.fd)) castto(fd))}
/* path manipulation */
-const mkdir = {path, mode; -> sys.mkdir(path, mode)}
+const mkdir = {path, mode; -> sys.mkdir(path, mode) castto(errno)}
const chdir = {path; -> sys.chdir(path) == 0}
const remove = {path; -> sys.unlink(path) == 0}