mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
Kernel: Use StringView literals for fs_type match in sys$mount(..)
This commit is contained in:
parent
a3787b9db7
commit
2e7728bb05
1 changed files with 7 additions and 7 deletions
|
@ -67,7 +67,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*>
|
||||||
|
|
||||||
RefPtr<FileSystem> fs;
|
RefPtr<FileSystem> fs;
|
||||||
|
|
||||||
if (fs_type == "ext2" || fs_type == "Ext2FS") {
|
if (fs_type == "ext2"sv || fs_type == "Ext2FS"sv) {
|
||||||
if (description.is_null())
|
if (description.is_null())
|
||||||
return EBADF;
|
return EBADF;
|
||||||
if (!description->file().is_block_device())
|
if (!description->file().is_block_device())
|
||||||
|
@ -80,20 +80,20 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*>
|
||||||
dbgln("mount: attempting to mount {} on {}", description->absolute_path(), target);
|
dbgln("mount: attempting to mount {} on {}", description->absolute_path(), target);
|
||||||
|
|
||||||
fs = Ext2FS::create(*description);
|
fs = Ext2FS::create(*description);
|
||||||
} else if (fs_type == "9p" || fs_type == "Plan9FS") {
|
} else if (fs_type == "9p"sv || fs_type == "Plan9FS"sv) {
|
||||||
if (description.is_null())
|
if (description.is_null())
|
||||||
return EBADF;
|
return EBADF;
|
||||||
|
|
||||||
fs = Plan9FS::create(*description);
|
fs = Plan9FS::create(*description);
|
||||||
} else if (fs_type == "proc" || fs_type == "ProcFS") {
|
} else if (fs_type == "proc"sv || fs_type == "ProcFS"sv) {
|
||||||
fs = ProcFS::create();
|
fs = ProcFS::create();
|
||||||
} else if (fs_type == "devpts" || fs_type == "DevPtsFS") {
|
} else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) {
|
||||||
fs = DevPtsFS::create();
|
fs = DevPtsFS::create();
|
||||||
} else if (fs_type == "dev" || fs_type == "DevFS") {
|
} else if (fs_type == "dev"sv || fs_type == "DevFS"sv) {
|
||||||
fs = DevFS::create();
|
fs = DevFS::create();
|
||||||
} else if (fs_type == "sys" || fs_type == "SysFS") {
|
} else if (fs_type == "sys"sv || fs_type == "SysFS"sv) {
|
||||||
fs = SysFS::create();
|
fs = SysFS::create();
|
||||||
} else if (fs_type == "tmp" || fs_type == "TmpFS") {
|
} else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) {
|
||||||
fs = TmpFS::create();
|
fs = TmpFS::create();
|
||||||
} else {
|
} else {
|
||||||
return ENODEV;
|
return ENODEV;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue