diff --git a/Kernel/init.cpp b/Kernel/init.cpp index ba0bdee0ffc..bc9670ce7b6 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #if 0 @@ -128,15 +129,26 @@ void init() Disk::initialize(); - auto dev_hd0 = IDEDiskDevice::create(); - auto dev_null = make(); - auto dev_full = make(); - auto dev_zero = make(); - auto dev_random = make(); + auto vfs = make(); + auto dev_zero = make(); + vfs->registerCharacterDevice(1, 3, *dev_zero); + + auto dev_null = make(); + vfs->registerCharacterDevice(1, 5, *dev_zero); + + auto dev_full = make(); + vfs->registerCharacterDevice(1, 7, *dev_full); + + auto dev_random = make(); + 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);