mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
This commit is contained in:
parent
7ee10c6926
commit
79fa9765ca
262 changed files with 2415 additions and 2600 deletions
|
@ -62,10 +62,10 @@ Memory::MappedROM map_ebda();
|
|||
|
||||
class BIOSSysFSComponent : public SysFSComponent {
|
||||
public:
|
||||
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, OpenFileDescription*) const override;
|
||||
virtual ErrorOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, OpenFileDescription*) const override;
|
||||
|
||||
protected:
|
||||
virtual KResultOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const = 0;
|
||||
virtual ErrorOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const = 0;
|
||||
explicit BIOSSysFSComponent(StringView name);
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
private:
|
||||
DMIEntryPointExposedBlob(PhysicalAddress dmi_entry_point, size_t blob_size);
|
||||
virtual KResultOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const override;
|
||||
virtual ErrorOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const override;
|
||||
PhysicalAddress m_dmi_entry_point;
|
||||
size_t m_dmi_entry_point_length;
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
private:
|
||||
SMBIOSExposedTable(PhysicalAddress dmi_entry_point, size_t blob_size);
|
||||
virtual KResultOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const override;
|
||||
virtual ErrorOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const override;
|
||||
|
||||
PhysicalAddress m_smbios_structure_table;
|
||||
size_t m_smbios_structure_table_length;
|
||||
|
@ -94,7 +94,7 @@ private:
|
|||
|
||||
class BIOSSysFSDirectory : public SysFSDirectory {
|
||||
public:
|
||||
static KResultOr<NonnullRefPtr<BIOSSysFSDirectory>> try_create(FirmwareSysFSDirectory&);
|
||||
static ErrorOr<NonnullRefPtr<BIOSSysFSDirectory>> try_create(FirmwareSysFSDirectory&);
|
||||
|
||||
void create_components();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue