mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:08:12 +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
|
@ -67,9 +67,9 @@ UNMAP_AFTER_INIT ACPISysFSComponent::ACPISysFSComponent(NonnullOwnPtr<KString> t
|
|||
{
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT ErrorOr<NonnullRefPtr<ACPISysFSDirectory>> ACPISysFSDirectory::try_create(FirmwareSysFSDirectory& firmware_directory)
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<ACPISysFSDirectory> ACPISysFSDirectory::must_create(FirmwareSysFSDirectory& firmware_directory)
|
||||
{
|
||||
auto acpi_directory = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) ACPISysFSDirectory(firmware_directory)));
|
||||
auto acpi_directory = MUST(adopt_nonnull_ref_or_enomem(new (nothrow) ACPISysFSDirectory(firmware_directory)));
|
||||
return acpi_directory;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue