VFS mounts an ext2fs root! :^)

This commit is contained in:
Andreas Kling 2018-10-17 11:44:06 +02:00
parent d2425495ca
commit b05ed591ab

View file

@ -19,6 +19,7 @@
#include <VirtualFileSystem/FullDevice.h>
#include <VirtualFileSystem/RandomDevice.h>
#include <VirtualFileSystem/Ext2FileSystem.h>
#include <VirtualFileSystem/VirtualFileSystem.h>
#include <AK/OwnPtr.h>
#if 0
@ -128,15 +129,26 @@ void init()
Disk::initialize();
auto dev_hd0 = IDEDiskDevice::create();
auto dev_null = make<NullDevice>();
auto dev_full = make<FullDevice>();
auto dev_zero = make<ZeroDevice>();
auto dev_random = make<RandomDevice>();
auto vfs = make<VirtualFileSystem>();
auto dev_zero = make<ZeroDevice>();
vfs->registerCharacterDevice(1, 3, *dev_zero);
auto dev_null = make<NullDevice>();
vfs->registerCharacterDevice(1, 5, *dev_zero);
auto dev_full = make<FullDevice>();
vfs->registerCharacterDevice(1, 7, *dev_full);
auto dev_random = make<RandomDevice>();
vfs->registerCharacterDevice(1, 8, *dev_random);
auto dev_hd0 = IDEDiskDevice::create();
auto e2fs = Ext2FileSystem::create(dev_hd0.copyRef());
e2fs->initialize();
vfs->mountRoot(e2fs.copyRef());
// new Task(motd_main, "motd", IPC::Handle::MotdTask, Task::Ring0);
new Task(user_main, "user", IPC::Handle::UserTask, Task::Ring3);