diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:07:27 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:07:27 +0200 |
commit | 60a7a9d523113c7345cae78c9779e20e6a50c808 (patch) | |
tree | 4d3c54cf4bbaad3df6980917b3fa05d4dfd7cdf9 | |
parent | 517170a986a56fbd64d51be708ce20950de1b167 (diff) | |
download | serenity-60a7a9d523113c7345cae78c9779e20e6a50c808.zip |
Kernel: Rename SystemExposedFolder => SysFSDirectory
"Folder" is a GUI concept, let's call this "Directory".
Also, "System" is completely generic, so let's be more specific and
call this "SysFS..."
-rw-r--r-- | Kernel/ACPI/Parser.cpp | 2 | ||||
-rw-r--r-- | Kernel/ACPI/Parser.h | 2 | ||||
-rw-r--r-- | Kernel/Arch/PC/BIOS.cpp | 2 | ||||
-rw-r--r-- | Kernel/Arch/PC/BIOS.h | 2 | ||||
-rw-r--r-- | Kernel/Bus/PCI/Access.cpp | 8 | ||||
-rw-r--r-- | Kernel/Bus/PCI/Access.h | 8 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.h | 6 | ||||
-rw-r--r-- | Kernel/SystemExposed.cpp | 10 | ||||
-rw-r--r-- | Kernel/SystemExposed.h | 8 |
10 files changed, 25 insertions, 25 deletions
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp index d0b6095508..b401297f58 100644 --- a/Kernel/ACPI/Parser.cpp +++ b/Kernel/ACPI/Parser.cpp @@ -67,7 +67,7 @@ UNMAP_AFTER_INIT void ExposedFolder::initialize() } UNMAP_AFTER_INIT ExposedFolder::ExposedFolder() - : SystemExposedFolder("acpi", SysFSComponentRegistry::the().root_folder()) + : SysFSDirectory("acpi", SysFSComponentRegistry::the().root_folder()) { NonnullRefPtrVector<SysFSComponent> components; size_t ssdt_count = 0; diff --git a/Kernel/ACPI/Parser.h b/Kernel/ACPI/Parser.h index 67f54934ca..fb3bab47f2 100644 --- a/Kernel/ACPI/Parser.h +++ b/Kernel/ACPI/Parser.h @@ -17,7 +17,7 @@ namespace Kernel { namespace ACPI { -class ExposedFolder : public SystemExposedFolder { +class ExposedFolder : public SysFSDirectory { public: static void initialize(); diff --git a/Kernel/Arch/PC/BIOS.cpp b/Kernel/Arch/PC/BIOS.cpp index e820180ed2..7e4e8e9fd7 100644 --- a/Kernel/Arch/PC/BIOS.cpp +++ b/Kernel/Arch/PC/BIOS.cpp @@ -135,7 +135,7 @@ OwnPtr<KBuffer> BIOSExposedFolder::smbios_structure_table() const } UNMAP_AFTER_INIT BIOSExposedFolder::BIOSExposedFolder() - : SystemExposedFolder("bios", SysFSComponentRegistry::the().root_folder()) + : SysFSDirectory("bios", SysFSComponentRegistry::the().root_folder()) { auto entry_32bit = find_dmi_entry32bit_point(); m_dmi_entry_point = entry_32bit.value(); diff --git a/Kernel/Arch/PC/BIOS.h b/Kernel/Arch/PC/BIOS.h index 6daa12899b..153051f75c 100644 --- a/Kernel/Arch/PC/BIOS.h +++ b/Kernel/Arch/PC/BIOS.h @@ -92,7 +92,7 @@ private: size_t m_smbios_structure_table_length; }; -class BIOSExposedFolder : public SystemExposedFolder { +class BIOSExposedFolder : public SysFSDirectory { public: static void initialize(); diff --git a/Kernel/Bus/PCI/Access.cpp b/Kernel/Bus/PCI/Access.cpp index c754c24233..f5b17f040a 100644 --- a/Kernel/Bus/PCI/Access.cpp +++ b/Kernel/Bus/PCI/Access.cpp @@ -368,13 +368,13 @@ void Capability::write32(u32 field, u32 value) PCI::write32(m_address, m_ptr + field, value); } -UNMAP_AFTER_INIT NonnullRefPtr<ExposedDeviceFolder> ExposedDeviceFolder::create(const SystemExposedFolder& parent_folder, Address address) +UNMAP_AFTER_INIT NonnullRefPtr<ExposedDeviceFolder> ExposedDeviceFolder::create(const SysFSDirectory& parent_folder, Address address) { return adopt_ref(*new (nothrow) ExposedDeviceFolder(parent_folder, address)); } -UNMAP_AFTER_INIT ExposedDeviceFolder::ExposedDeviceFolder(const SystemExposedFolder& parent_folder, Address address) - : SystemExposedFolder(String::formatted("{:04x}:{:04x}:{:02x}.{}", address.seg(), address.bus(), address.device(), address.function()), parent_folder) +UNMAP_AFTER_INIT ExposedDeviceFolder::ExposedDeviceFolder(const SysFSDirectory& parent_folder, Address address) + : SysFSDirectory(String::formatted("{:04x}:{:04x}:{:02x}.{}", address.seg(), address.bus(), address.device(), address.function()), parent_folder) { m_components.append(ExposedAttribute::create("vendor", *this, PCI_VENDOR_ID, 2)); m_components.append(ExposedAttribute::create("device_id", *this, PCI_DEVICE_ID, 2)); @@ -393,7 +393,7 @@ UNMAP_AFTER_INIT void BusExposedFolder::initialize() } UNMAP_AFTER_INIT BusExposedFolder::BusExposedFolder() - : SystemExposedFolder("pci", SysFSComponentRegistry::the().root_folder()) + : SysFSDirectory("pci", SysFSComponentRegistry::the().root_folder()) { PCI::enumerate([&](const Address& address, ID) { auto pci_device = PCI::ExposedDeviceFolder::create(*this, address); diff --git a/Kernel/Bus/PCI/Access.h b/Kernel/Bus/PCI/Access.h index af2db61c2f..6ef4915bc3 100644 --- a/Kernel/Bus/PCI/Access.h +++ b/Kernel/Bus/PCI/Access.h @@ -14,7 +14,7 @@ namespace Kernel::PCI { -class BusExposedFolder final : public SystemExposedFolder { +class BusExposedFolder final : public SysFSDirectory { public: static void initialize(); @@ -22,13 +22,13 @@ private: BusExposedFolder(); }; -class ExposedDeviceFolder final : public SystemExposedFolder { +class ExposedDeviceFolder final : public SysFSDirectory { public: - static NonnullRefPtr<ExposedDeviceFolder> create(const SystemExposedFolder&, Address); + static NonnullRefPtr<ExposedDeviceFolder> create(const SysFSDirectory&, Address); const Address& address() const { return m_address; } private: - ExposedDeviceFolder(const SystemExposedFolder&, Address); + ExposedDeviceFolder(const SysFSDirectory&, Address); Address m_address; }; diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index 8ac59e6bea..e0c1edb49d 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -55,7 +55,7 @@ KResult SysFSRootFolder::traverse_as_directory(unsigned fsid, Function<bool(File } SysFSRootFolder::SysFSRootFolder() - : SystemExposedFolder(".") + : SysFSDirectory(".") { } diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h index 18a2302e65..b63b45b383 100644 --- a/Kernel/FileSystem/SysFS.h +++ b/Kernel/FileSystem/SysFS.h @@ -21,7 +21,7 @@ class SysFS; class SysFSInode; class SysFSDirectoryInode; -class SysFSRootFolder final : public SystemExposedFolder { +class SysFSRootFolder final : public SysFSDirectory { friend class SysFSComponentRegistry; public: @@ -35,7 +35,7 @@ private: class SysFSComponentRegistry { friend class SysFS; friend class SysFSComponent; - friend class SystemExposedFolder; + friend class SysFSDirectory; friend class SysFSRootFolder; public: @@ -46,7 +46,7 @@ public: SysFSComponentRegistry(); void register_new_component(SysFSComponent&); - NonnullRefPtr<SystemExposedFolder> root_folder() { return m_root_folder; } + NonnullRefPtr<SysFSDirectory> root_folder() { return m_root_folder; } private: Lock m_lock; diff --git a/Kernel/SystemExposed.cpp b/Kernel/SystemExposed.cpp index 312df7d5a3..b308c58619 100644 --- a/Kernel/SystemExposed.cpp +++ b/Kernel/SystemExposed.cpp @@ -26,7 +26,7 @@ SysFSComponent::SysFSComponent(StringView name) { } -KResult SystemExposedFolder::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const +KResult SysFSDirectory::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const { Locker locker(SysFSComponentRegistry::the().m_lock); VERIFY(m_parent_folder); @@ -40,7 +40,7 @@ KResult SystemExposedFolder::traverse_as_directory(unsigned fsid, Function<bool( return KSuccess; } -RefPtr<SysFSComponent> SystemExposedFolder::lookup(StringView name) +RefPtr<SysFSComponent> SysFSDirectory::lookup(StringView name) { for (auto& component : m_components) { if (component.name() == name) { @@ -50,18 +50,18 @@ RefPtr<SysFSComponent> SystemExposedFolder::lookup(StringView name) return {}; } -SystemExposedFolder::SystemExposedFolder(StringView name) +SysFSDirectory::SysFSDirectory(StringView name) : SysFSComponent(name) { } -SystemExposedFolder::SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder) +SysFSDirectory::SysFSDirectory(StringView name, SysFSDirectory const& parent_folder) : SysFSComponent(name) , m_parent_folder(parent_folder) { } -NonnullRefPtr<Inode> SystemExposedFolder::to_inode(SysFS const& sysfs_instance) const +NonnullRefPtr<Inode> SysFSDirectory::to_inode(SysFS const& sysfs_instance) const { return SysFSDirectoryInode::create(sysfs_instance, *this); } diff --git a/Kernel/SystemExposed.h b/Kernel/SystemExposed.h index 4b4a260b2d..190021c3c5 100644 --- a/Kernel/SystemExposed.h +++ b/Kernel/SystemExposed.h @@ -43,7 +43,7 @@ private: InodeIndex m_component_index {}; }; -class SystemExposedFolder : public SysFSComponent { +class SysFSDirectory : public SysFSComponent { public: virtual KResultOr<size_t> entries_count() const override { return m_components.size(); }; virtual KResult traverse_as_directory(unsigned, Function<bool(FileSystem::DirectoryEntryView const&)>) const override; @@ -53,10 +53,10 @@ public: virtual NonnullRefPtr<Inode> to_inode(SysFS const& sysfs_instance) const override final; protected: - explicit SystemExposedFolder(StringView name); - SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder); + explicit SysFSDirectory(StringView name); + SysFSDirectory(StringView name, SysFSDirectory const& parent_folder); NonnullRefPtrVector<SysFSComponent> m_components; - RefPtr<SystemExposedFolder> m_parent_folder; + RefPtr<SysFSDirectory> m_parent_folder; }; } |