mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:17:45 +00:00
Some more renaming:
FileSystem -> FS SyntheticFileSystem -> SynthFS ProcFileSystem -> ProcFS Ext2FileSystem -> Ext2FS Ext2Inode -> Ext2FSInode
This commit is contained in:
parent
eced5f11e3
commit
2529925fe9
16 changed files with 187 additions and 187 deletions
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue