summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-07 14:46:11 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-07 14:47:44 +0200
commite80b274a23cb6bbe83bc48058c779624b16dd556 (patch)
tree905578ee29d9c5bad03b28b8381a2c29fb715f0f /Private/KernelKit
parentc4f3bfd671ad8ec5721c3d2c45de4806f34ebb75 (diff)
MHR-23: ErrorID error codes are now deprecated in favor of HError.
- Cleanup done in SystemLib. - Refactor system API. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/FileManager.hpp5
-rw-r--r--Private/KernelKit/HError.hpp2
-rw-r--r--Private/KernelKit/Timer.hpp3
3 files changed, 4 insertions, 6 deletions
diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp
index 142e1afd..7da08cbb 100644
--- a/Private/KernelKit/FileManager.hpp
+++ b/Private/KernelKit/FileManager.hpp
@@ -20,7 +20,6 @@
#include <CompilerKit/CompilerKit.hxx>
#include <HintKit/CompilerHint.hxx>
-#include <NewKit/ErrorID.hpp>
#include <NewKit/Ref.hpp>
#include <NewKit/Stream.hpp>
@@ -159,7 +158,7 @@ namespace NewOS
ErrorOr<Int64> WriteAll(const VoidPtr data) noexcept
{
if (data == nullptr)
- return ErrorOr<Int64>(H_INVALID_DATA);
+ return ErrorOr<Int64>(kErrorInvalidData);
auto man = FSClass::GetMounted();
@@ -169,7 +168,7 @@ namespace NewOS
return ErrorOr<Int64>(0);
}
- return ErrorOr<Int64>(H_INVALID_DATA);
+ return ErrorOr<Int64>(kErrorInvalidData);
}
VoidPtr Read() noexcept
diff --git a/Private/KernelKit/HError.hpp b/Private/KernelKit/HError.hpp
index 5a4f49fb..50cc5522 100644
--- a/Private/KernelKit/HError.hpp
+++ b/Private/KernelKit/HError.hpp
@@ -7,7 +7,6 @@
#pragma once
#include <NewKit/Defines.hpp>
-#include <NewKit/ErrorID.hpp>
namespace NewOS
{
@@ -37,6 +36,7 @@ namespace NewOS
inline constexpr HError kErrorNoEntrypoint = 53;
inline constexpr HError kErrorDiskIsCorrupted = 54;
inline constexpr HError kErrorDisk = 55;
+ inline constexpr HError kErrorInvalidData = 56;
inline constexpr HError kErrorUnimplemented = 0;
Boolean ke_bug_check(void) noexcept;
diff --git a/Private/KernelKit/Timer.hpp b/Private/KernelKit/Timer.hpp
index fac1b11f..5f133dfe 100644
--- a/Private/KernelKit/Timer.hpp
+++ b/Private/KernelKit/Timer.hpp
@@ -8,8 +8,7 @@
#include <ArchKit/ArchKit.hpp>
#include <CompilerKit/CompilerKit.hxx>
-
-#include <NewKit/ErrorID.hpp>
+#include <KernelKit/HError.hpp>
namespace NewOS
{