summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/DevPtsFS.cpp4
-rw-r--r--Kernel/FileSystem/DevTmpFS.cpp4
-rw-r--r--Kernel/FileSystem/DevTmpFS.h2
-rw-r--r--Kernel/FileSystem/FIFO.cpp4
-rw-r--r--Kernel/FileSystem/FileSystem.h2
-rw-r--r--Kernel/FileSystem/ISO9660FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/Inode.h2
-rw-r--r--Kernel/FileSystem/InodeIdentifier.h2
-rw-r--r--Kernel/FileSystem/Plan9FileSystem.cpp8
-rw-r--r--Kernel/FileSystem/Plan9FileSystem.h2
-rw-r--r--Kernel/FileSystem/SysFS/Component.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/RootDirectory.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp84
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp4
-rw-r--r--Kernel/FileSystem/TmpFS.cpp4
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp8
20 files changed, 77 insertions, 77 deletions
diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp
index ffb1d21013..06d187e284 100644
--- a/Kernel/FileSystem/DevPtsFS.cpp
+++ b/Kernel/FileSystem/DevPtsFS.cpp
@@ -103,8 +103,8 @@ ErrorOr<void> DevPtsFSInode::traverse_as_directory(Function<ErrorOr<void>(FileSy
if (identifier().index() > 1)
return ENOTDIR;
- TRY(callback({ ".", identifier(), 0 }));
- TRY(callback({ "..", identifier(), 0 }));
+ TRY(callback({ "."sv, identifier(), 0 }));
+ TRY(callback({ ".."sv, identifier(), 0 }));
return SlavePTY::all_instances().with([&](auto& list) -> ErrorOr<void> {
StringBuilder builder;
diff --git a/Kernel/FileSystem/DevTmpFS.cpp b/Kernel/FileSystem/DevTmpFS.cpp
index e6fff851aa..6c78255a4f 100644
--- a/Kernel/FileSystem/DevTmpFS.cpp
+++ b/Kernel/FileSystem/DevTmpFS.cpp
@@ -205,8 +205,8 @@ DevTmpFSDirectoryInode::~DevTmpFSDirectoryInode() = default;
ErrorOr<void> DevTmpFSDirectoryInode::traverse_as_directory(Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
{
MutexLocker locker(m_inode_lock);
- TRY(callback({ ".", identifier(), 0 }));
- TRY(callback({ "..", identifier(), 0 }));
+ TRY(callback({ "."sv, identifier(), 0 }));
+ TRY(callback({ ".."sv, identifier(), 0 }));
for (auto& node : m_nodes) {
InodeIdentifier identifier = { fsid(), node.index() };
TRY(callback({ node.name(), identifier, 0 }));
diff --git a/Kernel/FileSystem/DevTmpFS.h b/Kernel/FileSystem/DevTmpFS.h
index e94da24a6a..4326e04ec5 100644
--- a/Kernel/FileSystem/DevTmpFS.h
+++ b/Kernel/FileSystem/DevTmpFS.h
@@ -153,7 +153,7 @@ class DevTmpFSRootDirectoryInode final : public DevTmpFSDirectoryInode {
public:
virtual ~DevTmpFSRootDirectoryInode() override;
- virtual StringView name() const override { return "."; }
+ virtual StringView name() const override { return "."sv; }
private:
// ^DevTmpFSInode
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp
index 571e70d3df..259f061d8c 100644
--- a/Kernel/FileSystem/FIFO.cpp
+++ b/Kernel/FileSystem/FIFO.cpp
@@ -41,7 +41,7 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> FIFO::open_direction_blocking(FIFO::
if (m_writers == 0) {
locker.unlock();
- m_write_open_queue.wait_forever("FIFO");
+ m_write_open_queue.wait_forever("FIFO"sv);
locker.lock();
}
}
@@ -51,7 +51,7 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> FIFO::open_direction_blocking(FIFO::
if (m_readers == 0) {
locker.unlock();
- m_read_open_queue.wait_forever("FIFO");
+ m_read_open_queue.wait_forever("FIFO"sv);
locker.lock();
}
}
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index ef50f87c05..e504244874 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -67,7 +67,7 @@ protected:
void set_block_size(u64 size) { m_block_size = size; }
void set_fragment_size(size_t size) { m_fragment_size = size; }
- mutable Mutex m_lock { "FS" };
+ mutable Mutex m_lock { "FS"sv };
private:
FileSystemID m_fsid;
diff --git a/Kernel/FileSystem/ISO9660FileSystem.cpp b/Kernel/FileSystem/ISO9660FileSystem.cpp
index 81843c4372..532302a5b3 100644
--- a/Kernel/FileSystem/ISO9660FileSystem.cpp
+++ b/Kernel/FileSystem/ISO9660FileSystem.cpp
@@ -239,7 +239,7 @@ ErrorOr<void> ISO9660FS::parse_volume_set()
}
auto const* header = reinterpret_cast<ISO::VolumeDescriptorHeader const*>(block->data());
- if (StringView { header->identifier, 5 } != "CD001") {
+ if (StringView { header->identifier, 5 } != "CD001"sv) {
dbgln_if(ISO9660_DEBUG, "Header magic at volume descriptor {} is not valid", current_block_index - first_data_area_block);
return EIO;
}
diff --git a/Kernel/FileSystem/Inode.h b/Kernel/FileSystem/Inode.h
index 84c8eca1b7..befb3a42f2 100644
--- a/Kernel/FileSystem/Inode.h
+++ b/Kernel/FileSystem/Inode.h
@@ -109,7 +109,7 @@ protected:
void did_modify_contents();
void did_delete_self();
- mutable Mutex m_inode_lock { "Inode" };
+ mutable Mutex m_inode_lock { "Inode"sv };
private:
FileSystem& m_file_system;
diff --git a/Kernel/FileSystem/InodeIdentifier.h b/Kernel/FileSystem/InodeIdentifier.h
index 585bbe6905..2e00f1c8cc 100644
--- a/Kernel/FileSystem/InodeIdentifier.h
+++ b/Kernel/FileSystem/InodeIdentifier.h
@@ -56,6 +56,6 @@ template<>
struct AK::Formatter<Kernel::InodeIdentifier> : AK::Formatter<FormatString> {
ErrorOr<void> format(FormatBuilder& builder, Kernel::InodeIdentifier value)
{
- return AK::Formatter<FormatString>::format(builder, "{}:{}", value.fsid(), value.index());
+ return AK::Formatter<FormatString>::format(builder, "{}:{}"sv, value.fsid(), value.index());
}
};
diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp
index 17336b7b24..43822bfb2d 100644
--- a/Kernel/FileSystem/Plan9FileSystem.cpp
+++ b/Kernel/FileSystem/Plan9FileSystem.cpp
@@ -201,7 +201,7 @@ ErrorOr<void> Plan9FS::initialize()
ensure_thread();
Message version_message { *this, Message::Type::Tversion };
- version_message << (u32)m_max_message_size << "9P2000.L";
+ version_message << (u32)m_max_message_size << "9P2000.L"sv;
TRY(post_message_and_wait_for_a_reply(version_message));
@@ -218,8 +218,8 @@ ErrorOr<void> Plan9FS::initialize()
Message attach_message { *this, Message::Type::Tattach };
// FIXME: This needs a user name and an "export" name; but how do we get them?
// Perhaps initialize() should accept a string of FS-specific options...
- attach_message << root_fid << (u32)-1 << "sergey"
- << "/";
+ attach_message << root_fid << (u32)-1 << "sergey"sv
+ << "/"sv;
if (m_remote_protocol_version >= ProtocolVersion::v9P2000u)
attach_message << (u32)-1;
@@ -653,7 +653,7 @@ void Plan9FS::ensure_thread()
{
SpinlockLocker lock(m_thread_lock);
if (!m_thread_running.exchange(true, AK::MemoryOrder::memory_order_acq_rel)) {
- auto process_name = KString::try_create("Plan9FS");
+ auto process_name = KString::try_create("Plan9FS"sv);
if (process_name.is_error())
TODO();
(void)Process::create_kernel_process(m_thread, process_name.release_value(), [&]() {
diff --git a/Kernel/FileSystem/Plan9FileSystem.h b/Kernel/FileSystem/Plan9FileSystem.h
index 590d317124..cae3edb872 100644
--- a/Kernel/FileSystem/Plan9FileSystem.h
+++ b/Kernel/FileSystem/Plan9FileSystem.h
@@ -135,7 +135,7 @@ private:
ProtocolVersion m_remote_protocol_version { ProtocolVersion::v9P2000 };
size_t m_max_message_size { 4 * KiB };
- Mutex m_send_lock { "Plan9FS send" };
+ Mutex m_send_lock { "Plan9FS send"sv };
Plan9FSBlockerSet m_completion_blocker;
HashMap<u16, NonnullRefPtr<ReceiveCompletion>> m_completions;
diff --git a/Kernel/FileSystem/SysFS/Component.cpp b/Kernel/FileSystem/SysFS/Component.cpp
index e5c28bd21c..af366a5880 100644
--- a/Kernel/FileSystem/SysFS/Component.cpp
+++ b/Kernel/FileSystem/SysFS/Component.cpp
@@ -35,8 +35,8 @@ ErrorOr<void> SysFSDirectory::traverse_as_directory(FileSystemID fsid, Function<
{
MutexLocker locker(SysFSComponentRegistry::the().get_lock());
VERIFY(m_parent_directory);
- TRY(callback({ ".", { fsid, component_index() }, 0 }));
- TRY(callback({ "..", { fsid, m_parent_directory->component_index() }, 0 }));
+ TRY(callback({ "."sv, { fsid, component_index() }, 0 }));
+ TRY(callback({ ".."sv, { fsid, m_parent_directory->component_index() }, 0 }));
for (auto& component : m_components) {
InodeIdentifier identifier = { fsid, component.component_index() };
diff --git a/Kernel/FileSystem/SysFS/RootDirectory.cpp b/Kernel/FileSystem/SysFS/RootDirectory.cpp
index 5eb21c5e57..8a5951ebf6 100644
--- a/Kernel/FileSystem/SysFS/RootDirectory.cpp
+++ b/Kernel/FileSystem/SysFS/RootDirectory.cpp
@@ -20,8 +20,8 @@ NonnullRefPtr<SysFSRootDirectory> SysFSRootDirectory::create()
ErrorOr<void> SysFSRootDirectory::traverse_as_directory(FileSystemID fsid, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
{
MutexLocker locker(SysFSComponentRegistry::the().get_lock());
- TRY(callback({ ".", { fsid, component_index() }, 0 }));
- TRY(callback({ "..", { fsid, 0 }, 0 }));
+ TRY(callback({ "."sv, { fsid, component_index() }, 0 }));
+ TRY(callback({ ".."sv, { fsid, 0 }, 0 }));
for (auto const& component : m_components) {
InodeIdentifier identifier = { fsid, component.component_index() };
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
index 5ff793575d..bcd77960dd 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
@@ -17,8 +17,8 @@ ErrorOr<void> SysFSUSBBusDirectory::traverse_as_directory(FileSystemID fsid, Fun
SpinlockLocker lock(m_lock);
// Note: if the parent directory is null, it means something bad happened as this should not happen for the USB directory.
VERIFY(m_parent_directory);
- TRY(callback({ ".", { fsid, component_index() }, 0 }));
- TRY(callback({ "..", { fsid, m_parent_directory->component_index() }, 0 }));
+ TRY(callback({ "."sv, { fsid, component_index() }, 0 }));
+ TRY(callback({ ".."sv, { fsid, m_parent_directory->component_index() }, 0 }));
for (auto const& device_node : m_device_nodes) {
InodeIdentifier identifier = { fsid, device_node.component_index() };
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp
index e411fba780..b18dfc469b 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp
@@ -26,56 +26,56 @@ ErrorOr<void> SysFSUSBDeviceInformation::try_generate(KBufferBuilder& builder)
auto array = TRY(JsonArraySerializer<>::try_create(builder));
auto obj = TRY(array.add_object());
- TRY(obj.add("device_address", m_device->address()));
- TRY(obj.add("usb_spec_compliance_bcd", m_device->device_descriptor().usb_spec_compliance_bcd));
- TRY(obj.add("device_class", m_device->device_descriptor().device_class));
- TRY(obj.add("device_sub_class", m_device->device_descriptor().device_sub_class));
- TRY(obj.add("device_protocol", m_device->device_descriptor().device_protocol));
- TRY(obj.add("max_packet_size", m_device->device_descriptor().max_packet_size));
- TRY(obj.add("vendor_id", m_device->device_descriptor().vendor_id));
- TRY(obj.add("product_id", m_device->device_descriptor().product_id));
- TRY(obj.add("device_release_bcd", m_device->device_descriptor().device_release_bcd));
- TRY(obj.add("manufacturer_id_descriptor_index", m_device->device_descriptor().manufacturer_id_descriptor_index));
- TRY(obj.add("product_string_descriptor_index", m_device->device_descriptor().product_string_descriptor_index));
- TRY(obj.add("serial_number_descriptor_index", m_device->device_descriptor().serial_number_descriptor_index));
- TRY(obj.add("num_configurations", m_device->device_descriptor().num_configurations));
- TRY(obj.add("length", m_device->device_descriptor().descriptor_header.length));
- TRY(obj.add("descriptor_type", m_device->device_descriptor().descriptor_header.descriptor_type));
-
- auto configuration_array = TRY(obj.add_array("configurations"));
+ TRY(obj.add("device_address"sv, m_device->address()));
+ TRY(obj.add("usb_spec_compliance_bcd"sv, m_device->device_descriptor().usb_spec_compliance_bcd));
+ TRY(obj.add("device_class"sv, m_device->device_descriptor().device_class));
+ TRY(obj.add("device_sub_class"sv, m_device->device_descriptor().device_sub_class));
+ TRY(obj.add("device_protocol"sv, m_device->device_descriptor().device_protocol));
+ TRY(obj.add("max_packet_size"sv, m_device->device_descriptor().max_packet_size));
+ TRY(obj.add("vendor_id"sv, m_device->device_descriptor().vendor_id));
+ TRY(obj.add("product_id"sv, m_device->device_descriptor().product_id));
+ TRY(obj.add("device_release_bcd"sv, m_device->device_descriptor().device_release_bcd));
+ TRY(obj.add("manufacturer_id_descriptor_index"sv, m_device->device_descriptor().manufacturer_id_descriptor_index));
+ TRY(obj.add("product_string_descriptor_index"sv, m_device->device_descriptor().product_string_descriptor_index));
+ TRY(obj.add("serial_number_descriptor_index"sv, m_device->device_descriptor().serial_number_descriptor_index));
+ TRY(obj.add("num_configurations"sv, m_device->device_descriptor().num_configurations));
+ TRY(obj.add("length"sv, m_device->device_descriptor().descriptor_header.length));
+ TRY(obj.add("descriptor_type"sv, m_device->device_descriptor().descriptor_header.descriptor_type));
+
+ auto configuration_array = TRY(obj.add_array("configurations"sv));
for (auto const& configuration : m_device->configurations()) {
auto configuration_object = TRY(configuration_array.add_object());
auto const& configuration_descriptor = configuration.descriptor();
- TRY(configuration_object.add("length", configuration_descriptor.descriptor_header.length));
- TRY(configuration_object.add("descriptor_type", configuration_descriptor.descriptor_header.descriptor_type));
- TRY(configuration_object.add("total_length", configuration_descriptor.total_length));
- TRY(configuration_object.add("number_of_interfaces", configuration_descriptor.number_of_interfaces));
- TRY(configuration_object.add("attributes_bitmap", configuration_descriptor.attributes_bitmap));
- TRY(configuration_object.add("max_power", configuration_descriptor.max_power_in_ma));
-
- auto interface_array = TRY(configuration_object.add_array("interfaces"));
+ TRY(configuration_object.add("length"sv, configuration_descriptor.descriptor_header.length));
+ TRY(configuration_object.add("descriptor_type"sv, configuration_descriptor.descriptor_header.descriptor_type));
+ TRY(configuration_object.add("total_length"sv, configuration_descriptor.total_length));
+ TRY(configuration_object.add("number_of_interfaces"sv, configuration_descriptor.number_of_interfaces));
+ TRY(configuration_object.add("attributes_bitmap"sv, configuration_descriptor.attributes_bitmap));
+ TRY(configuration_object.add("max_power"sv, configuration_descriptor.max_power_in_ma));
+
+ auto interface_array = TRY(configuration_object.add_array("interfaces"sv));
for (auto const& interface : configuration.interfaces()) {
auto interface_object = TRY(interface_array.add_object());
auto const& interface_descriptor = interface.descriptor();
- TRY(interface_object.add("length", interface_descriptor.descriptor_header.length));
- TRY(interface_object.add("descriptor_type", interface_descriptor.descriptor_header.descriptor_type));
- TRY(interface_object.add("interface_number", interface_descriptor.interface_id));
- TRY(interface_object.add("alternate_setting", interface_descriptor.alternate_setting));
- TRY(interface_object.add("num_endpoints", interface_descriptor.number_of_endpoints));
- TRY(interface_object.add("interface_class_code", interface_descriptor.interface_class_code));
- TRY(interface_object.add("interface_sub_class_code", interface_descriptor.interface_sub_class_code));
- TRY(interface_object.add("interface_protocol", interface_descriptor.interface_protocol));
- TRY(interface_object.add("interface_string_desc_index", interface_descriptor.interface_string_descriptor_index));
-
- auto endpoint_array = TRY(interface_object.add_array("endpoints"));
+ TRY(interface_object.add("length"sv, interface_descriptor.descriptor_header.length));
+ TRY(interface_object.add("descriptor_type"sv, interface_descriptor.descriptor_header.descriptor_type));
+ TRY(interface_object.add("interface_number"sv, interface_descriptor.interface_id));
+ TRY(interface_object.add("alternate_setting"sv, interface_descriptor.alternate_setting));
+ TRY(interface_object.add("num_endpoints"sv, interface_descriptor.number_of_endpoints));
+ TRY(interface_object.add("interface_class_code"sv, interface_descriptor.interface_class_code));
+ TRY(interface_object.add("interface_sub_class_code"sv, interface_descriptor.interface_sub_class_code));
+ TRY(interface_object.add("interface_protocol"sv, interface_descriptor.interface_protocol));
+ TRY(interface_object.add("interface_string_desc_index"sv, interface_descriptor.interface_string_descriptor_index));
+
+ auto endpoint_array = TRY(interface_object.add_array("endpoints"sv));
for (auto const& endpoint : interface.endpoints()) {
auto endpoint_object = TRY(endpoint_array.add_object());
- TRY(endpoint_object.add("length", endpoint.descriptor_header.length));
- TRY(endpoint_object.add("descriptor_length", endpoint.descriptor_header.descriptor_type));
- TRY(endpoint_object.add("endpoint_address", endpoint.endpoint_address));
- TRY(endpoint_object.add("attribute_bitmap", endpoint.endpoint_attributes_bitmap));
- TRY(endpoint_object.add("max_packet_size", endpoint.max_packet_size));
- TRY(endpoint_object.add("polling_interval", endpoint.poll_interval_in_frames));
+ TRY(endpoint_object.add("length"sv, endpoint.descriptor_header.length));
+ TRY(endpoint_object.add("descriptor_length"sv, endpoint.descriptor_header.descriptor_type));
+ TRY(endpoint_object.add("endpoint_address"sv, endpoint.endpoint_address));
+ TRY(endpoint_object.add("attribute_bitmap"sv, endpoint.endpoint_attributes_bitmap));
+ TRY(endpoint_object.add("max_packet_size"sv, endpoint.max_packet_size));
+ TRY(endpoint_object.add("polling_interval"sv, endpoint.poll_interval_in_frames));
TRY(endpoint_object.finish());
}
TRY(endpoint_array.finish());
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
index 9ccae41742..07f074a45d 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
@@ -37,7 +37,7 @@ protected:
private:
ErrorOr<void> try_generate(KBufferBuilder&);
virtual ErrorOr<void> refresh_data(OpenFileDescription& description) const override;
- mutable Mutex m_lock { "SysFSUSBDeviceInformation" };
+ mutable Mutex m_lock { "SysFSUSBDeviceInformation"sv };
NonnullOwnPtr<KString> m_device_name;
};
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.cpp
index 3dcefd70bc..21a95c3ef5 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/BlockDevicesDirectory.cpp
@@ -22,8 +22,8 @@ SysFSBlockDevicesDirectory::SysFSBlockDevicesDirectory(SysFSDevicesDirectory con
ErrorOr<void> SysFSBlockDevicesDirectory::traverse_as_directory(FileSystemID fsid, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
{
VERIFY(m_parent_directory);
- TRY(callback({ ".", { fsid, component_index() }, 0 }));
- TRY(callback({ "..", { fsid, m_parent_directory->component_index() }, 0 }));
+ TRY(callback({ "."sv, { fsid, component_index() }, 0 }));
+ TRY(callback({ ".."sv, { fsid, m_parent_directory->component_index() }, 0 }));
return SysFSComponentRegistry::the().devices_list().with_exclusive([&](auto& list) -> ErrorOr<void> {
for (auto& exposed_device : list) {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.cpp
index 0d09be1b68..3c3f65ba34 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/CharacterDevicesDirectory.cpp
@@ -21,8 +21,8 @@ SysFSCharacterDevicesDirectory::SysFSCharacterDevicesDirectory(SysFSDevicesDirec
ErrorOr<void> SysFSCharacterDevicesDirectory::traverse_as_directory(FileSystemID fsid, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
{
VERIFY(m_parent_directory);
- TRY(callback({ ".", { fsid, component_index() }, 0 }));
- TRY(callback({ "..", { fsid, m_parent_directory->component_index() }, 0 }));
+ TRY(callback({ "."sv, { fsid, component_index() }, 0 }));
+ TRY(callback({ ".."sv, { fsid, m_parent_directory->component_index() }, 0 }));
return SysFSComponentRegistry::the().devices_list().with_exclusive([&](auto& list) -> ErrorOr<void> {
for (auto& exposed_device : list) {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
index 665fe1e635..5fa0c6def0 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
@@ -96,7 +96,7 @@ UNMAP_AFTER_INIT Optional<PhysicalAddress> BIOSSysFSDirectory::find_dmi_entry64b
auto bios_or_error = map_bios();
if (bios_or_error.is_error())
return {};
- return bios_or_error.value().find_chunk_starting_with("_SM3_", 16);
+ return bios_or_error.value().find_chunk_starting_with("_SM3_"sv, 16);
}
UNMAP_AFTER_INIT Optional<PhysicalAddress> BIOSSysFSDirectory::find_dmi_entry32bit_point()
@@ -104,7 +104,7 @@ UNMAP_AFTER_INIT Optional<PhysicalAddress> BIOSSysFSDirectory::find_dmi_entry32b
auto bios_or_error = map_bios();
if (bios_or_error.is_error())
return {};
- return bios_or_error.value().find_chunk_starting_with("_SM_", 16);
+ return bios_or_error.value().find_chunk_starting_with("_SM_"sv, 16);
}
}
diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp
index b8e58f094c..2c4ba99891 100644
--- a/Kernel/FileSystem/TmpFS.cpp
+++ b/Kernel/FileSystem/TmpFS.cpp
@@ -77,9 +77,9 @@ ErrorOr<void> TmpFSInode::traverse_as_directory(Function<ErrorOr<void>(FileSyste
if (!is_directory())
return ENOTDIR;
- TRY(callback({ ".", identifier(), 0 }));
+ TRY(callback({ "."sv, identifier(), 0 }));
if (auto parent = m_parent.strong_ref())
- TRY(callback({ "..", parent->identifier(), 0 }));
+ TRY(callback({ ".."sv, parent->identifier(), 0 }));
for (auto& child : m_children) {
TRY(callback({ child.name->view(), child.inode->identifier(), 0 }));
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp
index 1c29b4f4bd..d17530e344 100644
--- a/Kernel/FileSystem/VirtualFileSystem.cpp
+++ b/Kernel/FileSystem/VirtualFileSystem.cpp
@@ -128,7 +128,7 @@ ErrorOr<void> VirtualFileSystem::mount_root(FileSystem& fs)
mounts.append(move(mount));
});
- m_root_custody = TRY(Custody::try_create(nullptr, "", *m_root_inode, root_mount_flags));
+ m_root_custody = TRY(Custody::try_create(nullptr, ""sv, *m_root_inode, root_mount_flags));
return {};
}
@@ -376,7 +376,7 @@ ErrorOr<void> VirtualFileSystem::mkdir(StringView path, mode_t mode, Custody& ba
path = path.trim("/"sv, TrimMode::Right);
if (path.is_empty()) {
// NOTE: This means the path was a series of slashes, which resolves to "/".
- path = "/";
+ path = "/"sv;
}
RefPtr<Custody> parent_custody;
@@ -736,8 +736,8 @@ ErrorOr<void> VirtualFileSystem::rmdir(StringView path, Custody& base)
if (custody->is_readonly())
return EROFS;
- TRY(inode.remove_child("."));
- TRY(inode.remove_child(".."));
+ TRY(inode.remove_child("."sv));
+ TRY(inode.remove_child(".."sv));
return parent_inode.remove_child(KLexicalPath::basename(path));
}