1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 10:05:10 +00:00

Kernel/SysFS: Prevent allocation for component name during construction

Instead, allocate before constructing the object and pass NonnullOwnPtr
of KString to the object if needed. Some classes can determine their
names as they have a known attribute to look for or have a static name.
This commit is contained in:
Liav A 2021-12-12 16:33:08 +02:00 committed by Andreas Kling
parent 4daf07e69f
commit 478f543899
17 changed files with 116 additions and 65 deletions

View file

@ -32,7 +32,7 @@ void FirmwareSysFSDirectory::create_components()
}
UNMAP_AFTER_INIT FirmwareSysFSDirectory::FirmwareSysFSDirectory()
: SysFSDirectory("firmware", SysFSComponentRegistry::the().root_directory())
: SysFSDirectory(SysFSComponentRegistry::the().root_directory())
{
}