diff options
author | Liav A <liavalb@gmail.com> | 2021-12-12 16:46:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-14 09:01:33 +0100 |
commit | 381fdaa163d8af320f71f817e2922c5d396e2b28 (patch) | |
tree | 83829b7321045c258f66272ca156943a37425b67 /Kernel/Firmware/BIOS.h | |
parent | 478f54389903d34a0a5b670d6606c5cc0db1dd4d (diff) | |
download | serenity-381fdaa163d8af320f71f817e2922c5d396e2b28.zip |
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.
Diffstat (limited to 'Kernel/Firmware/BIOS.h')
-rw-r--r-- | Kernel/Firmware/BIOS.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Firmware/BIOS.h b/Kernel/Firmware/BIOS.h index 57699300b6..afa7b556f8 100644 --- a/Kernel/Firmware/BIOS.h +++ b/Kernel/Firmware/BIOS.h @@ -72,7 +72,7 @@ protected: class DMIEntryPointExposedBlob : public BIOSSysFSComponent { public: virtual StringView name() const override { return "smbios_entry_point"sv; } - static NonnullRefPtr<DMIEntryPointExposedBlob> create(PhysicalAddress dmi_entry_point, size_t blob_size); + static NonnullRefPtr<DMIEntryPointExposedBlob> must_create(PhysicalAddress dmi_entry_point, size_t blob_size); private: DMIEntryPointExposedBlob(PhysicalAddress dmi_entry_point, size_t blob_size); @@ -84,7 +84,7 @@ private: class SMBIOSExposedTable : public BIOSSysFSComponent { public: virtual StringView name() const override { return "DMI"sv; } - static NonnullRefPtr<SMBIOSExposedTable> create(PhysicalAddress, size_t blob_size); + static NonnullRefPtr<SMBIOSExposedTable> must_create(PhysicalAddress, size_t blob_size); private: SMBIOSExposedTable(PhysicalAddress dmi_entry_point, size_t blob_size); @@ -97,7 +97,7 @@ private: class BIOSSysFSDirectory : public SysFSDirectory { public: virtual StringView name() const override { return "bios"sv; } - static ErrorOr<NonnullRefPtr<BIOSSysFSDirectory>> try_create(FirmwareSysFSDirectory&); + static NonnullRefPtr<BIOSSysFSDirectory> must_create(FirmwareSysFSDirectory&); void create_components(); |