ladybird/Kernel/Firmware/SysFSFirmware.h
Liav A 478f543899 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.
2021-12-14 09:01:33 +01:00

26 lines
441 B
C++

/*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS.h>
namespace Kernel {
class FirmwareSysFSDirectory : public SysFSDirectory {
public:
virtual StringView name() const override { return "firmware"sv; }
static void initialize();
void create_components();
private:
FirmwareSysFSDirectory();
};
}