mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
Kernel: Expose device presence in /sys/dev/char and /sys/dev/block
These files are not marked as block devices or character devices so they are not meant to be used as device nodes. The filenames are formatted to the pattern "major:minor", but a Userland program need to call the parse these format and inspect the the major and minor numbers and create the real device nodes in /dev. Later on, it might be a good idea to ensure we don't create new SysFSComponents on the heap for each Device, but rather generate them only when required (and preferably to not create a SysFSComponent at all if possible).
This commit is contained in:
parent
009feefee0
commit
6a9c717a30
5 changed files with 183 additions and 2 deletions
|
@ -182,6 +182,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
|||
|
||||
load_kernel_symbol_table();
|
||||
|
||||
SysFSComponentRegistry::initialize();
|
||||
ConsoleDevice::initialize();
|
||||
s_bsp_processor.initialize(0);
|
||||
|
||||
|
@ -275,7 +276,6 @@ void init_stage2(void*)
|
|||
}
|
||||
|
||||
// Initialize the PCI Bus as early as possible, for early boot (PCI based) serial logging
|
||||
SysFSComponentRegistry::initialize();
|
||||
PCI::initialize();
|
||||
PCISerialDevice::detect();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue