diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-07-23 08:19:32 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-23 19:02:25 +0200 |
commit | 2e7728bb057f6f4bfe2cc856605f7fc9fcb9bec2 (patch) | |
tree | 823a9a0106cec3c577e36e23680b83a8fe45bba7 /Kernel | |
parent | a3787b9db7085b6dc8eb9eef4175d88e05f9948c (diff) | |
download | serenity-2e7728bb057f6f4bfe2cc856605f7fc9fcb9bec2.zip |
Kernel: Use StringView literals for fs_type match in sys$mount(..)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/mount.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp index b83148f4b5..f9444595e8 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -67,7 +67,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> RefPtr<FileSystem> fs; - if (fs_type == "ext2" || fs_type == "Ext2FS") { + if (fs_type == "ext2"sv || fs_type == "Ext2FS"sv) { if (description.is_null()) return EBADF; 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); 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()) return EBADF; 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(); - } else if (fs_type == "devpts" || fs_type == "DevPtsFS") { + } else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) { fs = DevPtsFS::create(); - } else if (fs_type == "dev" || fs_type == "DevFS") { + } else if (fs_type == "dev"sv || fs_type == "DevFS"sv) { fs = DevFS::create(); - } else if (fs_type == "sys" || fs_type == "SysFS") { + } else if (fs_type == "sys"sv || fs_type == "SysFS"sv) { fs = SysFS::create(); - } else if (fs_type == "tmp" || fs_type == "TmpFS") { + } else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) { fs = TmpFS::create(); } else { return ENODEV; |