diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-29 13:15:29 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-29 13:15:29 +0200 |
| commit | d9d42bcfeb444652ae198a6bd3481ce316549e55 (patch) | |
| tree | 238e88d868855c4ab6e1c6671bfc18a9930048fe /Kernel/KernelKit/DriveManager.hxx | |
| parent | f562fbf39333925689d6fb704af15efe5f99ed28 (diff) | |
kernel: Use local error codes for kernel calls. So that we know which
process caused the error, and it's not global as well.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/KernelKit/DriveManager.hxx')
| -rw-r--r-- | Kernel/KernelKit/DriveManager.hxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Kernel/KernelKit/DriveManager.hxx b/Kernel/KernelKit/DriveManager.hxx index df7d5f28..d4ccb50f 100644 --- a/Kernel/KernelKit/DriveManager.hxx +++ b/Kernel/KernelKit/DriveManager.hxx @@ -4,9 +4,10 @@ ------------------------------------------- */ -#ifndef __DRIVE_MANAGER__ -#define __DRIVE_MANAGER__ +#ifndef __INC_DRIVE_MANAGER_HXX__ +#define __INC_DRIVE_MANAGER_HXX__ +#include <KernelKit/ProcessScheduler.hxx> #include <CompilerKit/CompilerKit.hxx> #include <KernelKit/DebugOutput.hpp> #include <KernelKit/DeviceManager.hpp> @@ -99,7 +100,7 @@ namespace NewOS DriveTraitPtr GetAddressOf(Int32 index) { - DbgLastError() = kErrorSuccess; + ErrLocal() = kErrorSuccess; switch (index) { @@ -112,7 +113,7 @@ namespace NewOS case 3: return &mD; default: { - DbgLastError() = kErrorNoSuchDisk; + ErrLocal() = kErrorNoSuchDisk; kcout << "newoskrnl: No such disk.\n"; break; @@ -145,4 +146,4 @@ namespace NewOS DriveTrait construct_main_drive(void) noexcept; } // namespace NewOS -#endif /* ifndef __DRIVE_MANAGER__ */ +#endif /* ifndef __INC_DRIVE_MANAGER_HXX__ */ |
