1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

Kernel & Userland: Allow to mount image files formatted with Ext2FS

This commit is contained in:
Liav A 2020-04-06 11:55:08 +03:00 committed by Andreas Kling
parent ecee76b741
commit 23fb985f02
8 changed files with 96 additions and 51 deletions

View file

@ -582,14 +582,15 @@ int reboot()
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int mount(const char* source, const char* target, const char* fs_type, int flags)
int mount(int source_fd, const char* target, const char* fs_type, int flags)
{
if (!source || !target || !fs_type) {
if (!target || !fs_type) {
errno = EFAULT;
return -1;
}
Syscall::SC_mount_params params {
{ source, strlen(source) },
source_fd,
{ target, strlen(target) },
{ fs_type, strlen(fs_type) },
flags