mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
Kernel/SysFS: Make it clear that some components must be created in boot
Using the phrase "create" doesn't give information on whether the object must be allocated or a failure to do so can be handled gracefully. Therefore, we must use better phrase for such purpose, so "must_create" for the allocate-and-construct static methods is definitely good choice.
This commit is contained in:
parent
478f543899
commit
381fdaa163
5 changed files with 15 additions and 22 deletions
|
@ -23,7 +23,7 @@ namespace Kernel::ACPI {
|
|||
class ACPISysFSDirectory : public SysFSDirectory {
|
||||
public:
|
||||
virtual StringView name() const override { return "acpi"sv; }
|
||||
static ErrorOr<NonnullRefPtr<ACPISysFSDirectory>> try_create(FirmwareSysFSDirectory& firmware_directory);
|
||||
static NonnullRefPtr<ACPISysFSDirectory> must_create(FirmwareSysFSDirectory& firmware_directory);
|
||||
|
||||
private:
|
||||
explicit ACPISysFSDirectory(FirmwareSysFSDirectory& firmware_directory);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue