mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:28:11 +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:
parent
4daf07e69f
commit
478f543899
17 changed files with 116 additions and 65 deletions
|
@ -13,6 +13,7 @@ namespace Kernel {
|
|||
|
||||
class FirmwareSysFSDirectory : public SysFSDirectory {
|
||||
public:
|
||||
virtual StringView name() const override { return "firmware"sv; }
|
||||
static void initialize();
|
||||
|
||||
void create_components();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue