1
Fork 0
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:
Andreas Kling 2018-10-23 11:57:38 +02:00
parent 98f76f0153
commit ed2422d7af
13 changed files with 139 additions and 23 deletions

29
Kernel/ProcFileSystem.cpp Normal file
View 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";
}