summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 01:06:27 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 01:06:27 +0200
commit517170a986a56fbd64d51be708ce20950de1b167 (patch)
tree0f797761fec9496363d1bf0c28a5c4687a674080
parent27244eb0eea0d4a3c7a2e5174f9fd7bc3a547e7d (diff)
downloadserenity-517170a986a56fbd64d51be708ce20950de1b167.zip
Kernel: Rename SystemExposedComponent => SysFSComponent
-rw-r--r--Kernel/ACPI/Parser.cpp4
-rw-r--r--Kernel/ACPI/Parser.h2
-rw-r--r--Kernel/Arch/PC/BIOS.cpp2
-rw-r--r--Kernel/Arch/PC/BIOS.h2
-rw-r--r--Kernel/Bus/PCI/Access.cpp2
-rw-r--r--Kernel/Bus/PCI/Access.h2
-rw-r--r--Kernel/FileSystem/SysFS.cpp10
-rw-r--r--Kernel/FileSystem/SysFS.h14
-rw-r--r--Kernel/SystemExposed.cpp10
-rw-r--r--Kernel/SystemExposed.h16
10 files changed, 32 insertions, 32 deletions
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp
index 41df230453..d0b6095508 100644
--- a/Kernel/ACPI/Parser.cpp
+++ b/Kernel/ACPI/Parser.cpp
@@ -54,7 +54,7 @@ OwnPtr<KBuffer> ExposedComponent::try_to_generate_buffer() const
}
UNMAP_AFTER_INIT ExposedComponent::ExposedComponent(String name, PhysicalAddress paddr, size_t table_size)
- : SystemExposedComponent(name)
+ : SysFSComponent(name)
, m_paddr(paddr)
, m_length(table_size)
{
@@ -69,7 +69,7 @@ UNMAP_AFTER_INIT void ExposedFolder::initialize()
UNMAP_AFTER_INIT ExposedFolder::ExposedFolder()
: SystemExposedFolder("acpi", SysFSComponentRegistry::the().root_folder())
{
- NonnullRefPtrVector<SystemExposedComponent> components;
+ NonnullRefPtrVector<SysFSComponent> components;
size_t ssdt_count = 0;
ACPI::Parser::the()->enumerate_static_tables([&](const StringView& signature, PhysicalAddress p_table, size_t length) {
if (signature == "SSDT") {
diff --git a/Kernel/ACPI/Parser.h b/Kernel/ACPI/Parser.h
index c9fbd5dd2e..67f54934ca 100644
--- a/Kernel/ACPI/Parser.h
+++ b/Kernel/ACPI/Parser.h
@@ -25,7 +25,7 @@ private:
ExposedFolder();
};
-class ExposedComponent : public SystemExposedComponent {
+class ExposedComponent : public SysFSComponent {
public:
static NonnullRefPtr<ExposedComponent> create(String name, PhysicalAddress, size_t table_size);
diff --git a/Kernel/Arch/PC/BIOS.cpp b/Kernel/Arch/PC/BIOS.cpp
index 92286c0fdc..e820180ed2 100644
--- a/Kernel/Arch/PC/BIOS.cpp
+++ b/Kernel/Arch/PC/BIOS.cpp
@@ -25,7 +25,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<DMIEntryPointExposedBlob> DMIEntryPointExposedBlo
}
UNMAP_AFTER_INIT BIOSExposedComponent::BIOSExposedComponent(String name)
- : SystemExposedComponent(name)
+ : SysFSComponent(name)
{
}
diff --git a/Kernel/Arch/PC/BIOS.h b/Kernel/Arch/PC/BIOS.h
index 39bc11c73d..6daa12899b 100644
--- a/Kernel/Arch/PC/BIOS.h
+++ b/Kernel/Arch/PC/BIOS.h
@@ -58,7 +58,7 @@ namespace Kernel {
MappedROM map_bios();
MappedROM map_ebda();
-class BIOSExposedComponent : public SystemExposedComponent {
+class BIOSExposedComponent : public SysFSComponent {
public:
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, FileDescription*) const override;
diff --git a/Kernel/Bus/PCI/Access.cpp b/Kernel/Bus/PCI/Access.cpp
index 5c35f35809..c754c24233 100644
--- a/Kernel/Bus/PCI/Access.cpp
+++ b/Kernel/Bus/PCI/Access.cpp
@@ -407,7 +407,7 @@ NonnullRefPtr<ExposedAttribute> ExposedAttribute::create(String name, const Expo
}
ExposedAttribute::ExposedAttribute(String name, const ExposedDeviceFolder& device, size_t offset, size_t field_bytes_width)
- : SystemExposedComponent(name)
+ : SysFSComponent(name)
, m_device(device)
, m_offset(offset)
, m_field_bytes_width(field_bytes_width)
diff --git a/Kernel/Bus/PCI/Access.h b/Kernel/Bus/PCI/Access.h
index 14fb4be299..af2db61c2f 100644
--- a/Kernel/Bus/PCI/Access.h
+++ b/Kernel/Bus/PCI/Access.h
@@ -33,7 +33,7 @@ private:
Address m_address;
};
-class ExposedAttribute : public SystemExposedComponent {
+class ExposedAttribute : public SysFSComponent {
public:
static NonnullRefPtr<ExposedAttribute> create(String name, const ExposedDeviceFolder& device, size_t offset, size_t field_bytes_width);
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp
index 07430c7812..8ac59e6bea 100644
--- a/Kernel/FileSystem/SysFS.cpp
+++ b/Kernel/FileSystem/SysFS.cpp
@@ -30,7 +30,7 @@ UNMAP_AFTER_INIT SysFSComponentRegistry::SysFSComponentRegistry()
{
}
-UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SystemExposedComponent& component)
+UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SysFSComponent& component)
{
Locker locker(m_lock);
m_root_folder->m_components.append(component);
@@ -84,12 +84,12 @@ NonnullRefPtr<Inode> SysFS::root_inode() const
return *m_root_inode;
}
-NonnullRefPtr<SysFSInode> SysFSInode::create(SysFS const& fs, SystemExposedComponent const& component)
+NonnullRefPtr<SysFSInode> SysFSInode::create(SysFS const& fs, SysFSComponent const& component)
{
return adopt_ref(*new (nothrow) SysFSInode(fs, component));
}
-SysFSInode::SysFSInode(SysFS const& fs, SystemExposedComponent const& component)
+SysFSInode::SysFSInode(SysFS const& fs, SysFSComponent const& component)
: Inode(const_cast<SysFS&>(fs), component.component_index())
, m_associated_component(component)
{
@@ -167,12 +167,12 @@ KResult SysFSInode::truncate(u64)
return EPERM;
}
-NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysfs, SystemExposedComponent const& component)
+NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysfs, SysFSComponent const& component)
{
return adopt_ref(*new (nothrow) SysFSDirectoryInode(sysfs, component));
}
-SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SystemExposedComponent const& component)
+SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SysFSComponent const& component)
: SysFSInode(fs, component)
, m_parent_fs(const_cast<SysFS&>(fs))
{
diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h
index 882cec9c99..18a2302e65 100644
--- a/Kernel/FileSystem/SysFS.h
+++ b/Kernel/FileSystem/SysFS.h
@@ -34,7 +34,7 @@ private:
class SysFSComponentRegistry {
friend class SysFS;
- friend class SystemExposedComponent;
+ friend class SysFSComponent;
friend class SystemExposedFolder;
friend class SysFSRootFolder;
@@ -44,7 +44,7 @@ public:
static void initialize();
SysFSComponentRegistry();
- void register_new_component(SystemExposedComponent&);
+ void register_new_component(SysFSComponent&);
NonnullRefPtr<SystemExposedFolder> root_folder() { return m_root_folder; }
@@ -77,11 +77,11 @@ class SysFSInode : public Inode {
friend class SysFSDirectoryInode;
public:
- static NonnullRefPtr<SysFSInode> create(SysFS const&, SystemExposedComponent const&);
+ static NonnullRefPtr<SysFSInode> create(SysFS const&, SysFSComponent const&);
StringView name() const { return m_associated_component->name(); }
protected:
- SysFSInode(SysFS const&, SystemExposedComponent const&);
+ SysFSInode(SysFS const&, SysFSComponent const&);
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer& buffer, FileDescription*) const override;
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
virtual RefPtr<Inode> lookup(StringView name) override;
@@ -96,7 +96,7 @@ protected:
virtual KResult chown(uid_t, gid_t) override;
virtual KResult truncate(u64) override;
- NonnullRefPtr<SystemExposedComponent> m_associated_component;
+ NonnullRefPtr<SysFSComponent> m_associated_component;
};
class SysFSDirectoryInode : public SysFSInode {
@@ -104,11 +104,11 @@ class SysFSDirectoryInode : public SysFSInode {
friend class SysFSRootDirectoryInode;
public:
- static NonnullRefPtr<SysFSDirectoryInode> create(SysFS const&, SystemExposedComponent const&);
+ static NonnullRefPtr<SysFSDirectoryInode> create(SysFS const&, SysFSComponent const&);
virtual ~SysFSDirectoryInode() override;
protected:
- SysFSDirectoryInode(SysFS const&, SystemExposedComponent const&);
+ SysFSDirectoryInode(SysFS const&, SysFSComponent const&);
// ^Inode
virtual InodeMetadata metadata() const override;
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
diff --git a/Kernel/SystemExposed.cpp b/Kernel/SystemExposed.cpp
index 294f700fe8..312df7d5a3 100644
--- a/Kernel/SystemExposed.cpp
+++ b/Kernel/SystemExposed.cpp
@@ -20,7 +20,7 @@ static size_t allocate_inode_index()
return s_next_inode_index.value();
}
-SystemExposedComponent::SystemExposedComponent(StringView name)
+SysFSComponent::SysFSComponent(StringView name)
: m_name(KString::try_create(name).release_nonnull())
, m_component_index(allocate_inode_index())
{
@@ -40,7 +40,7 @@ KResult SystemExposedFolder::traverse_as_directory(unsigned fsid, Function<bool(
return KSuccess;
}
-RefPtr<SystemExposedComponent> SystemExposedFolder::lookup(StringView name)
+RefPtr<SysFSComponent> SystemExposedFolder::lookup(StringView name)
{
for (auto& component : m_components) {
if (component.name() == name) {
@@ -51,12 +51,12 @@ RefPtr<SystemExposedComponent> SystemExposedFolder::lookup(StringView name)
}
SystemExposedFolder::SystemExposedFolder(StringView name)
- : SystemExposedComponent(name)
+ : SysFSComponent(name)
{
}
SystemExposedFolder::SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder)
- : SystemExposedComponent(name)
+ : SysFSComponent(name)
, m_parent_folder(parent_folder)
{
}
@@ -66,7 +66,7 @@ NonnullRefPtr<Inode> SystemExposedFolder::to_inode(SysFS const& sysfs_instance)
return SysFSDirectoryInode::create(sysfs_instance, *this);
}
-NonnullRefPtr<Inode> SystemExposedComponent::to_inode(SysFS const& sysfs_instance) const
+NonnullRefPtr<Inode> SysFSComponent::to_inode(SysFS const& sysfs_instance) const
{
return SysFSInode::create(sysfs_instance, *this);
}
diff --git a/Kernel/SystemExposed.h b/Kernel/SystemExposed.h
index 10a5e338db..4b4a260b2d 100644
--- a/Kernel/SystemExposed.h
+++ b/Kernel/SystemExposed.h
@@ -19,13 +19,13 @@
namespace Kernel {
class SysFS;
-class SystemExposedComponent : public RefCounted<SystemExposedComponent> {
+class SysFSComponent : public RefCounted<SysFSComponent> {
public:
virtual KResultOr<size_t> entries_count() const { VERIFY_NOT_REACHED(); };
virtual StringView name() const { return m_name->view(); }
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, FileDescription*) const { VERIFY_NOT_REACHED(); }
virtual KResult traverse_as_directory(unsigned, Function<bool(FileSystem::DirectoryEntryView const&)>) const { VERIFY_NOT_REACHED(); }
- virtual RefPtr<SystemExposedComponent> lookup(StringView) { VERIFY_NOT_REACHED(); };
+ virtual RefPtr<SysFSComponent> lookup(StringView) { VERIFY_NOT_REACHED(); };
virtual KResultOr<size_t> write_bytes(off_t, size_t, UserOrKernelBuffer const&, FileDescription*) { return -EROFS; }
virtual size_t size() const { return 0; }
@@ -33,29 +33,29 @@ public:
InodeIndex component_index() const { return m_component_index; };
- virtual ~SystemExposedComponent() = default;
+ virtual ~SysFSComponent() = default;
protected:
- explicit SystemExposedComponent(StringView name);
+ explicit SysFSComponent(StringView name);
private:
NonnullOwnPtr<KString> m_name;
InodeIndex m_component_index {};
};
-class SystemExposedFolder : public SystemExposedComponent {
+class SystemExposedFolder : 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;
- virtual RefPtr<SystemExposedComponent> lookup(StringView name) override;
- void add_component(SystemExposedComponent const&);
+ virtual RefPtr<SysFSComponent> lookup(StringView name) override;
+ void add_component(SysFSComponent const&);
virtual NonnullRefPtr<Inode> to_inode(SysFS const& sysfs_instance) const override final;
protected:
explicit SystemExposedFolder(StringView name);
SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder);
- NonnullRefPtrVector<SystemExposedComponent> m_components;
+ NonnullRefPtrVector<SysFSComponent> m_components;
RefPtr<SystemExposedFolder> m_parent_folder;
};