1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:08:12 +00:00

Kernel+LibC: Add support for mount flags

At the moment, the actual flags are ignored, but we correctly propagate them all
the way from the original mount() syscall to each custody that resides on the
mounted FS.
This commit is contained in:
Sergey Bugaev 2020-01-11 18:25:26 +03:00 committed by Andreas Kling
parent 1e6ab0ed22
commit 4566c2d811
10 changed files with 54 additions and 34 deletions

View file

@ -610,13 +610,18 @@ int reboot()
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int mount(const char* source, const char* target, const char* fs_type)
int mount(const char* source, const char* target, const char* fs_type, int flags)
{
if (!source || !target || !fs_type) {
errno = EFAULT;
return -1;
}
Syscall::SC_mount_params params { { source, strlen(source) }, { target, strlen(target) }, { fs_type, strlen(fs_type) } };
Syscall::SC_mount_params params {
{ source, strlen(source) },
{ target, strlen(target) },
{ fs_type, strlen(fs_type) },
flags
};
int rc = syscall(SC_mount, &params);
__RETURN_WITH_ERRNO(rc, rc, -1);
}