commit 2ae399bf86e98bddd358192edaeab4843c44e8c8
parent a95ce3d0c4ed7fec9831f36d54434d96d755f75a
Author: Christopher M. Riedl <cmr@bluescreens.de>
Date: Sun, 5 Jun 2022 14:58:13 -0500
rt/+linux: add mount and umount2 syscalls
Signed-off-by: Christopher M. Riedl <cmr@bluescreens.de>
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha
@@ -786,3 +786,18 @@ export fn getsid(pid: int) (int | errno) = {
export fn setsid() (void | errno) = {
return wrap_return(syscall0(SYS_setsid))?: void;
};
+
+export fn mount(
+ source: *const char,
+ target: *const char,
+ filesystemtype: *const char,
+ mountflags: u64,
+ data: nullable *void
+) (void | errno) = {
+ wrap_return(syscall5(SYS_mount, source: uintptr, target: uintptr,
+ filesystemtype: uintptr, mountflags: u64, data: uintptr))?;
+};
+
+export fn umount2(target: *const char, flags: int) (void | errno) = {
+ wrap_return(syscall2(SYS_umount2, target: uintptr, flags: u64))?;
+};