From 381fdaa163d8af320f71f817e2922c5d396e2b28 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sun, 12 Dec 2021 16:46:11 +0200 Subject: 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. --- Kernel/Firmware/BIOS.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Kernel/Firmware/BIOS.h') 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 create(PhysicalAddress dmi_entry_point, size_t blob_size); + static NonnullRefPtr 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 create(PhysicalAddress, size_t blob_size); + static NonnullRefPtr 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> try_create(FirmwareSysFSDirectory&); + static NonnullRefPtr must_create(FirmwareSysFSDirectory&); void create_components(); -- cgit v1.2.3