1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

Kernel: Add TmpFS

This is an FS that stores all of its contents directly in memory.
It's mounted on /tmp by default.
This commit is contained in:
Sergey Bugaev 2019-08-15 18:16:45 +03:00 committed by Andreas Kling
parent d92ba85689
commit b4c607a8da
4 changed files with 429 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#include <Kernel/FileSystem/DevPtsFS.h>
#include <Kernel/FileSystem/Ext2FileSystem.h>
#include <Kernel/FileSystem/ProcFS.h>
#include <Kernel/FileSystem/TmpFS.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KParams.h>
#include <Kernel/Multiboot.h>
@ -117,9 +118,15 @@ VFS* vfs;
load_ksyms();
dbgprintf("Loaded ksyms\n");
// TODO: we should mount these from SystemServer
vfs->mount(ProcFS::the(), "/proc");
vfs->mount(DevPtsFS::the(), "/dev/pts");
auto tmpfs = TmpFS::create();
if (!tmpfs->initialize())
ASSERT_NOT_REACHED();
vfs->mount(move(tmpfs), "/tmp");
// Now, detect whether or not there are actually any floppy disks attached to the system
u8 detect = CMOS::read(0x10);
RefPtr<FloppyDiskDevice> fd0;