diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-08 00:51:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-08 01:10:53 +0100 |
commit | 79fa9765ca89869d19364143989436d117974c21 (patch) | |
tree | 3af62f70127d9217d841047f6b7461351800d1ae /Kernel/Devices/DeviceManagement.h | |
parent | 7ee10c69264cb278845a1e1b06d5acf2e5e7ddf0 (diff) | |
download | serenity-79fa9765ca89869d19364143989436d117974c21.zip |
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. :^)
Diffstat (limited to 'Kernel/Devices/DeviceManagement.h')
-rw-r--r-- | Kernel/Devices/DeviceManagement.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Devices/DeviceManagement.h b/Kernel/Devices/DeviceManagement.h index 50b263ee02..680d72f811 100644 --- a/Kernel/Devices/DeviceManagement.h +++ b/Kernel/Devices/DeviceManagement.h @@ -7,12 +7,12 @@ #pragma once #include <AK/Badge.h> +#include <AK/Error.h> #include <AK/NonnullRefPtrVector.h> #include <AK/OwnPtr.h> #include <AK/RefPtr.h> #include <AK/Time.h> #include <AK/Types.h> -#include <Kernel/API/KResult.h> #include <Kernel/API/TimePage.h> #include <Kernel/Arch/RegisterState.h> #include <Kernel/Devices/ConsoleDevice.h> @@ -51,7 +51,7 @@ public: ConsoleDevice& console_device(); template<typename DeviceType, typename... Args> - static inline KResultOr<NonnullRefPtr<DeviceType>> try_create_device(Args&&... args) + static inline ErrorOr<NonnullRefPtr<DeviceType>> try_create_device(Args&&... args) { auto device = TRY(adopt_nonnull_ref_or_enomem(new DeviceType(forward<Args>(args)...))); device->after_inserting(); |