From f95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 5 May 2024 21:10:18 +0200 Subject: MHR-23: Add run_format.sh, kernel patches. Signed-off-by: Amlal El Mahrouss --- Private/KernelKit/HError.hpp | 69 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'Private/KernelKit/HError.hpp') diff --git a/Private/KernelKit/HError.hpp b/Private/KernelKit/HError.hpp index b82f7c6b..5a4f49fb 100644 --- a/Private/KernelKit/HError.hpp +++ b/Private/KernelKit/HError.hpp @@ -9,40 +9,41 @@ #include #include -namespace NewOS { -typedef Int32 HError; - -inline constexpr HError kErrorSuccess = 0; -inline constexpr HError kErrorExecutable = 33; -inline constexpr HError kErrorExecutableLib = 34; // no such library!!! -inline constexpr HError kErrorFileNotFound = 35; -inline constexpr HError kErrorDirectoryNotFound = 36; -inline constexpr HError kErrorDiskReadOnly = 37; -inline constexpr HError kErrorDiskIsFull = 38; -inline constexpr HError kErrorProcessFault = 39; -inline constexpr HError kErrorSocketHangUp = 40; -inline constexpr HError kErrorThreadLocalStorage = 41; -inline constexpr HError kErrorMath = 42; -inline constexpr HError kErrorNoNetwork = 43; -inline constexpr HError kErrorHeapOutOfMemory = 44; -inline constexpr HError kErrorNoSuchDisk = 45; -inline constexpr HError kErrorFileExists = 46; -inline constexpr HError kErrorFormatFailed = 47; -inline constexpr HError kErrorNetworkTimeout = 48; -inline constexpr HError kErrorInternal = 49; -inline constexpr HError kErrorForkAlreadyExists = 50; -inline constexpr HError kErrorOutOfTeamSlot = 51; -inline constexpr HError kErrorHeapNotPresent = 52; -inline constexpr HError kErrorNoEntrypoint = 53; -inline constexpr HError kErrorDiskIsCorrupted = 54; -inline constexpr HError kErrorDisk = 55; -inline constexpr HError kErrorUnimplemented = 0; - -Boolean ke_bug_check(void) noexcept; -} // namespace NewOS - -#define DbgOk() (kLastError == NewOS::kErrorSuccess) -#define DbgFailed() (kLastError != NewOS::kErrorSuccess) +namespace NewOS +{ + typedef Int32 HError; + + inline constexpr HError kErrorSuccess = 0; + inline constexpr HError kErrorExecutable = 33; + inline constexpr HError kErrorExecutableLib = 34; // no such library!!! + inline constexpr HError kErrorFileNotFound = 35; + inline constexpr HError kErrorDirectoryNotFound = 36; + inline constexpr HError kErrorDiskReadOnly = 37; + inline constexpr HError kErrorDiskIsFull = 38; + inline constexpr HError kErrorProcessFault = 39; + inline constexpr HError kErrorSocketHangUp = 40; + inline constexpr HError kErrorThreadLocalStorage = 41; + inline constexpr HError kErrorMath = 42; + inline constexpr HError kErrorNoNetwork = 43; + inline constexpr HError kErrorHeapOutOfMemory = 44; + inline constexpr HError kErrorNoSuchDisk = 45; + inline constexpr HError kErrorFileExists = 46; + inline constexpr HError kErrorFormatFailed = 47; + inline constexpr HError kErrorNetworkTimeout = 48; + inline constexpr HError kErrorInternal = 49; + inline constexpr HError kErrorForkAlreadyExists = 50; + inline constexpr HError kErrorOutOfTeamSlot = 51; + inline constexpr HError kErrorHeapNotPresent = 52; + inline constexpr HError kErrorNoEntrypoint = 53; + inline constexpr HError kErrorDiskIsCorrupted = 54; + inline constexpr HError kErrorDisk = 55; + inline constexpr HError kErrorUnimplemented = 0; + + Boolean ke_bug_check(void) noexcept; +} // namespace NewOS + +#define DbgOk() (kLastError == NewOS::kErrorSuccess) +#define DbgFailed() (kLastError != NewOS::kErrorSuccess) #define DbgLastError() kLastError inline NewOS::HError kLastError = 0; -- cgit v1.2.3