summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 01:33:40 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 01:33:40 +0200
commit805319ed30d5842e1150434effc24e022aa1ad23 (patch)
treebf08041ba9e1e01abb7e45f9e86e7cd66a2ea1b8 /Kernel/FileSystem
parent5ec3f5433eb1138ecdda152080c776ebd82bc7f4 (diff)
downloadserenity-805319ed30d5842e1150434effc24e022aa1ad23.zip
Kernel: Replace "Folder" => "Directory" everywhere
Folders are a GUI concept, file systems have directories. :^)
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/ProcFS.cpp10
-rw-r--r--Kernel/FileSystem/SysFS.cpp10
-rw-r--r--Kernel/FileSystem/SysFS.h8
3 files changed, 14 insertions, 14 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index 575c643ed5..84b053eee1 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -33,7 +33,7 @@ UNMAP_AFTER_INIT void ProcFSComponentsRegistrar::initialize()
}
UNMAP_AFTER_INIT ProcFSComponentsRegistrar::ProcFSComponentsRegistrar()
- : m_root_folder(ProcFSRootFolder::must_create())
+ : m_root_folder(ProcFSRootDirectory::must_create())
{
}
@@ -42,7 +42,7 @@ const ProcFSBusDirectory& ProcFSComponentsRegistrar::buses_folder() const
return *m_root_folder->m_buses_folder;
}
-void ProcFSComponentsRegistrar::register_new_bus_folder(ProcFSExposedFolder& new_bus_folder)
+void ProcFSComponentsRegistrar::register_new_bus_folder(ProcFSExposedDirectory& new_bus_folder)
{
VERIFY(!m_root_folder->m_buses_folder.is_null());
m_root_folder->m_buses_folder->m_components.append(new_bus_folder);
@@ -51,7 +51,7 @@ void ProcFSComponentsRegistrar::register_new_bus_folder(ProcFSExposedFolder& new
void ProcFSComponentsRegistrar::register_new_process(Process& new_process)
{
Locker locker(m_lock);
- m_root_folder->m_process_folders.append(ProcFSProcessFolder::create(new_process));
+ m_root_folder->m_process_folders.append(ProcFSProcessDirectory::create(new_process));
}
void ProcFSComponentsRegistrar::unregister_process(Process& deleted_process)
@@ -59,8 +59,8 @@ void ProcFSComponentsRegistrar::unregister_process(Process& deleted_process)
auto process_folder = m_root_folder->process_folder_for(deleted_process).release_nonnull();
process_folder->prepare_for_deletion();
process_folder->m_list_node.remove();
- dbgln_if(PROCFS_DEBUG, "ProcFSExposedFolder ref_count now: {}", process_folder->ref_count());
- // Note: Let's ensure we are the last holder of the ProcFSProcessFolder object before it can be deleted for good
+ dbgln_if(PROCFS_DEBUG, "ProcFSExposedDirectory ref_count now: {}", process_folder->ref_count());
+ // Note: Let's ensure we are the last holder of the ProcFSProcessDirectory object before it can be deleted for good
VERIFY(process_folder->ref_count() == 1);
}
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp
index 12aeb2f40e..fd5a760c48 100644
--- a/Kernel/FileSystem/SysFS.cpp
+++ b/Kernel/FileSystem/SysFS.cpp
@@ -25,7 +25,7 @@ UNMAP_AFTER_INIT void SysFSComponentRegistry::initialize()
}
UNMAP_AFTER_INIT SysFSComponentRegistry::SysFSComponentRegistry()
- : m_root_folder(SysFSRootFolder::create())
+ : m_root_folder(SysFSRootDirectory::create())
{
}
@@ -35,12 +35,12 @@ UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SysFSCompon
m_root_folder->m_components.append(component);
}
-NonnullRefPtr<SysFSRootFolder> SysFSRootFolder::create()
+NonnullRefPtr<SysFSRootDirectory> SysFSRootDirectory::create()
{
- return adopt_ref(*new (nothrow) SysFSRootFolder);
+ return adopt_ref(*new (nothrow) SysFSRootDirectory);
}
-KResult SysFSRootFolder::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
+KResult SysFSRootDirectory::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
{
Locker locker(SysFSComponentRegistry::the().get_lock());
callback({ ".", { fsid, component_index() }, 0 });
@@ -53,7 +53,7 @@ KResult SysFSRootFolder::traverse_as_directory(unsigned fsid, Function<bool(File
return KSuccess;
}
-SysFSRootFolder::SysFSRootFolder()
+SysFSRootDirectory::SysFSRootDirectory()
: SysFSDirectory(".")
{
}
diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h
index 765712c9c9..7cff37b070 100644
--- a/Kernel/FileSystem/SysFS.h
+++ b/Kernel/FileSystem/SysFS.h
@@ -12,15 +12,15 @@
namespace Kernel {
-class SysFSRootFolder final : public SysFSDirectory {
+class SysFSRootDirectory final : public SysFSDirectory {
friend class SysFSComponentRegistry;
public:
- static NonnullRefPtr<SysFSRootFolder> create();
+ static NonnullRefPtr<SysFSRootDirectory> create();
virtual KResult traverse_as_directory(unsigned, Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
private:
- SysFSRootFolder();
+ SysFSRootDirectory();
};
class SysFSComponentRegistry {
@@ -37,7 +37,7 @@ public:
private:
Lock m_lock;
- NonnullRefPtr<SysFSRootFolder> m_root_folder;
+ NonnullRefPtr<SysFSRootDirectory> m_root_folder;
};
class SysFS final : public FileSystem {