summaryrefslogtreecommitdiff
path: root/Libraries/LibC
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibC')
-rw-r--r--Libraries/LibC/unistd.cpp7
-rw-r--r--Libraries/LibC/unistd.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index 10fffdd1a1..cd17c7ae83 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -582,15 +582,14 @@ int reboot()
__RETURN_WITH_ERRNO(rc, rc, -1);
}
-int mount(int source_fd, const char* target, const char* fs_type, int flags)
+int mount(const char* source, const char* target, const char* fs_type, int flags)
{
- if (!target || !fs_type) {
+ if (!source || !target || !fs_type) {
errno = EFAULT;
return -1;
}
-
Syscall::SC_mount_params params {
- source_fd,
+ { source, strlen(source) },
{ target, strlen(target) },
{ fs_type, strlen(fs_type) },
flags
diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h
index bf8e80068c..2566abfdfd 100644
--- a/Libraries/LibC/unistd.h
+++ b/Libraries/LibC/unistd.h
@@ -129,7 +129,7 @@ int fchown(int fd, uid_t, gid_t);
int ftruncate(int fd, off_t length);
int halt();
int reboot();
-int mount(int source_fd, const char* target, const char* fs_type, int flags);
+int mount(const char* source, const char* target, const char* fs_type, int flags);
int umount(const char* mountpoint);
int pledge(const char* promises, const char* execpromises);
int unveil(const char* path, const char* permissions);