summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-15 17:13:10 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-15 17:13:10 +0100
commit2529925fe9e41a4cceb436e5bc830c07810d6716 (patch)
treef5c7b99fb2786ca6e7933774bbcd7832c7eebe73 /Kernel
parenteced5f11e398ab1cdf3213925bf0c0f98414d60d (diff)
downloadserenity-2529925fe9e41a4cceb436e5bc830c07810d6716.zip
Some more renaming:
FileSystem -> FS SyntheticFileSystem -> SynthFS ProcFileSystem -> ProcFS Ext2FileSystem -> Ext2FS Ext2Inode -> Ext2FSInode
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/ProcFileSystem.cpp22
-rw-r--r--Kernel/ProcFileSystem.h10
-rw-r--r--Kernel/Process.cpp8
-rw-r--r--Kernel/init.cpp6
4 files changed, 23 insertions, 23 deletions
diff --git a/Kernel/ProcFileSystem.cpp b/Kernel/ProcFileSystem.cpp
index ea1ba1353b..645a36e8fa 100644
--- a/Kernel/ProcFileSystem.cpp
+++ b/Kernel/ProcFileSystem.cpp
@@ -6,25 +6,25 @@
#include "StdLib.h"
#include "i386.h"
-static ProcFileSystem* s_the;
+static ProcFS* s_the;
-ProcFileSystem& ProcFileSystem::the()
+ProcFS& ProcFS::the()
{
ASSERT(s_the);
return *s_the;
}
-RetainPtr<ProcFileSystem> ProcFileSystem::create()
+RetainPtr<ProcFS> ProcFS::create()
{
- return adopt(*new ProcFileSystem);
+ return adopt(*new ProcFS);
}
-ProcFileSystem::ProcFileSystem()
+ProcFS::ProcFS()
{
s_the = this;
}
-ProcFileSystem::~ProcFileSystem()
+ProcFS::~ProcFS()
{
}
@@ -147,7 +147,7 @@ ByteBuffer procfs$pid_cwd(Process& process)
return VFS::the().absolute_path(*inode).toByteBuffer();
}
-void ProcFileSystem::addProcess(Process& process)
+void ProcFS::addProcess(Process& process)
{
InterruptDisabler disabler;
char buf[16];
@@ -163,7 +163,7 @@ void ProcFileSystem::addProcess(Process& process)
addFile(create_generated_file("cwd", [&process] { return procfs$pid_cwd(process); }, 00120777), dir.index());
}
-void ProcFileSystem::removeProcess(Process& process)
+void ProcFS::removeProcess(Process& process)
{
InterruptDisabler disabler;
auto pid = process.pid();
@@ -354,9 +354,9 @@ ByteBuffer procfs$vnodes()
return buffer;
}
-bool ProcFileSystem::initialize()
+bool ProcFS::initialize()
{
- SyntheticFileSystem::initialize();
+ SynthFS::initialize();
addFile(create_generated_file("mm", procfs$mm));
addFile(create_generated_file("regions", procfs$regions));
addFile(create_generated_file("mounts", procfs$mounts));
@@ -367,7 +367,7 @@ bool ProcFileSystem::initialize()
return true;
}
-const char* ProcFileSystem::class_name() const
+const char* ProcFS::class_name() const
{
return "procfs";
}
diff --git a/Kernel/ProcFileSystem.h b/Kernel/ProcFileSystem.h
index 9541faa092..f9169f9e3e 100644
--- a/Kernel/ProcFileSystem.h
+++ b/Kernel/ProcFileSystem.h
@@ -5,12 +5,12 @@
class Process;
-class ProcFileSystem final : public SyntheticFileSystem {
+class ProcFS final : public SynthFS {
public:
- static ProcFileSystem& the() PURE;
+ static ProcFS& the() PURE;
- virtual ~ProcFileSystem() override;
- static RetainPtr<ProcFileSystem> create();
+ virtual ~ProcFS() override;
+ static RetainPtr<ProcFS> create();
virtual bool initialize() override;
virtual const char* class_name() const override;
@@ -19,7 +19,7 @@ public:
void removeProcess(Process&);
private:
- ProcFileSystem();
+ ProcFS();
HashMap<pid_t, InodeIndex> m_pid2inode;
};
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 6ec78994f3..3df32e6abb 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -274,7 +274,7 @@ Process* Process::fork(RegisterDump& regs)
dbgprintf("fork: child will begin executing at %w:%x with stack %w:%x\n", child->m_tss.cs, child->m_tss.eip, child->m_tss.ss, child->m_tss.esp);
#endif
- ProcFileSystem::the().addProcess(*child);
+ ProcFS::the().addProcess(*child);
{
InterruptDisabler disabler;
@@ -498,7 +498,7 @@ Process* Process::create_user_process(const String& path, uid_t uid, gid_t gid,
if (error != 0)
return nullptr;
- ProcFileSystem::the().addProcess(*process);
+ ProcFS::the().addProcess(*process);
{
InterruptDisabler disabler;
@@ -561,7 +561,7 @@ Process* Process::create_kernel_process(void (*e)(), String&& name)
g_processes->prepend(process);
system.nprocess++;
}
- ProcFileSystem::the().addProcess(*process);
+ ProcFS::the().addProcess(*process);
#ifdef TASK_DEBUG
kprintf("Kernel process %u (%s) spawned @ %p\n", process->pid(), process->name().characters(), process->m_tss.eip);
#endif
@@ -691,7 +691,7 @@ Process::Process(String&& name, uid_t uid, gid_t gid, pid_t ppid, RingLevel ring
Process::~Process()
{
InterruptDisabler disabler;
- ProcFileSystem::the().removeProcess(*this);
+ ProcFS::the().removeProcess(*this);
system.nprocess--;
gdt_free_entry(selector());
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index c36f4c1ba5..5e88b197c6 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -195,7 +195,7 @@ static void init_stage2()
vfs->register_character_device(*tty3);
auto dev_hd0 = IDEDiskDevice::create();
- auto e2fs = Ext2FileSystem::create(dev_hd0.copyRef());
+ auto e2fs = Ext2FS::create(dev_hd0.copyRef());
e2fs->initialize();
vfs->mount_root(e2fs.copyRef());
@@ -214,7 +214,7 @@ static void init_stage2()
}
#endif
- vfs->mount(ProcFileSystem::the(), "/proc");
+ vfs->mount(ProcFS::the(), "/proc");
Vector<String> environment;
environment.append("TERM=ansi");
@@ -280,7 +280,7 @@ void init()
kprintf("%u kB base memory\n", base_memory);
kprintf("%u kB extended memory\n", ext_memory);
- auto procfs = ProcFileSystem::create();
+ auto procfs = ProcFS::create();
procfs->initialize();
Process::initialize();