qword: Add mount syscall
@@ -650,6 +650,21 @@ int sys_setuid(uid_t uid) {
return ret;
}
+int sys_mount(const char *source, const char *target,
+ const char *filesystemtype, unsigned long mountflags,
+ const void *data) {
+
+ int ret;
+ register unsigned long arg4_reg asm("r10") = mountflags;
+ register const void *arg5_reg asm("r8") = data;
+
+ asm volatile ("syscall" : "=a" (ret)
+ : "a"(41), "D"(source), "S"(target),
+ "d"(filesystemtype), "r"(arg4_reg), "r"(arg5_reg)
+ : "rcx", "r11");
+ return ret;
+}
+
#endif // MLIBC_BUILDING_RTDL
} // namespace mlibc
