mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:45:09 +00:00
Start adding a basic /proc filesystem and a "ps" utility.
This commit is contained in:
parent
98f76f0153
commit
ed2422d7af
13 changed files with 139 additions and 23 deletions
29
Kernel/ProcFileSystem.cpp
Normal file
29
Kernel/ProcFileSystem.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include "ProcFileSystem.h"
|
||||
#include <AK/StdLib.h>
|
||||
|
||||
RetainPtr<ProcFileSystem> ProcFileSystem::create()
|
||||
{
|
||||
return adopt(*new ProcFileSystem);
|
||||
}
|
||||
|
||||
ProcFileSystem::ProcFileSystem()
|
||||
{
|
||||
}
|
||||
|
||||
ProcFileSystem::~ProcFileSystem()
|
||||
{
|
||||
}
|
||||
|
||||
bool ProcFileSystem::initialize()
|
||||
{
|
||||
SyntheticFileSystem::initialize();
|
||||
addFile(createGeneratedFile("summary", [] {
|
||||
return String("Process summary!").toByteBuffer();
|
||||
}));
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* ProcFileSystem::className() const
|
||||
{
|
||||
return "procfs";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue