1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:25:08 +00:00

Kernel: Have devices automagically register themselves with the VFS.

This commit is contained in:
Andreas Kling 2019-02-17 10:38:07 +01:00
parent e74c833af3
commit b6bf26430d
4 changed files with 11 additions and 24 deletions

View file

@ -66,28 +66,9 @@ VFS* vfs;
Syscall::initialize();
auto dev_zero = make<ZeroDevice>();
vfs->register_device(*dev_zero);
vfs->register_device(*dev_null);
auto dev_full = make<FullDevice>();
vfs->register_device(*dev_full);
auto dev_random = make<RandomDevice>();
vfs->register_device(*dev_random);
auto dev_ptmx = make<PTYMultiplexer>();
vfs->register_device(*dev_ptmx);
vfs->register_device(*keyboard);
vfs->register_device(*ps2mouse);
vfs->register_device(*tty0);
vfs->register_device(*tty1);
vfs->register_device(*tty2);
vfs->register_device(*tty3);
vfs->register_device(BXVGADevice::the());
auto dev_hd0 = IDEDiskDevice::create();
auto e2fs = Ext2FS::create(dev_hd0.copy_ref());
e2fs->initialize();
@ -145,6 +126,8 @@ VFS* vfs;
kmalloc_init();
init_ksyms();
vfs = new VFS;
auto console = make<Console>();
RTC::initialize();
@ -152,8 +135,6 @@ VFS* vfs;
gdt_init();
idt_init();
vfs = new VFS;
keyboard = new KeyboardDevice;
ps2mouse = new PS2MouseDevice;
dev_null = new NullDevice;