diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-04-28 15:13:03 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-04-28 15:13:03 +0000 |
| commit | 14f10cc0b35155ddb19ec9069ebb884246e61dcf (patch) | |
| tree | a988617d1c511cf04eb2c2392829a37d82a59e2e /Private/KernelKit | |
| parent | db0681412191dcceb5aa99cf31fb8339d6bc4adb (diff) | |
| parent | 346558208d39a036effe3a4ec232fa5df5a3c8e7 (diff) | |
Merged in MHR-18 (pull request #8)
MHR-18: A lot of fixes and improvements, mostly related to disk I/O and kernel stability.
Diffstat (limited to 'Private/KernelKit')
| -rw-r--r-- | Private/KernelKit/DebugOutput.hpp | 11 | ||||
| -rw-r--r-- | Private/KernelKit/DriveManager.hxx | 12 | ||||
| -rw-r--r-- | Private/KernelKit/PEFCodeManager.hxx | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp index f24933cc..6c4da58e 100644 --- a/Private/KernelKit/DebugOutput.hpp +++ b/Private/KernelKit/DebugOutput.hpp @@ -57,8 +57,8 @@ inline TerminalDevice carriage_return() { namespace Detail { inline TerminalDevice _write_number(const Long &x, TerminalDevice& term) { - int y = x / 10; - int h = x % 10; + UInt64 y = (x > 0 ? x : -x) / 10; + UInt64 h = (x > 0 ? x : -x) % 10; if (y) _write_number(y, term); @@ -81,8 +81,8 @@ inline TerminalDevice _write_number(const Long &x, TerminalDevice& term) { } inline TerminalDevice _write_number_hex(const Long &x, TerminalDevice& term) { - int y = x / 16; - int h = x % 16; + UInt64 y = (x > 0 ? x : -x) / 16; + UInt64 h = (x > 0 ? x : -x) % 16; if (y) _write_number_hex(y, term); @@ -94,7 +94,7 @@ inline TerminalDevice _write_number_hex(const Long &x, TerminalDevice& term) { if (y < 0) y = -y; - const char NUMBERS[17] = "0123456789"; + const char NUMBERS[17] = "0123456789ABCDEF"; Char buf[2]; buf[0] = NUMBERS[h]; @@ -143,4 +143,3 @@ class DebuggerPortHeader final { #define kcout TerminalDevice::Shared() #define endl end_line() - diff --git a/Private/KernelKit/DriveManager.hxx b/Private/KernelKit/DriveManager.hxx index c3d7c484..0fd8a0d4 100644 --- a/Private/KernelKit/DriveManager.hxx +++ b/Private/KernelKit/DriveManager.hxx @@ -73,12 +73,12 @@ class MountpointInterface final { NEWOS_COPY_DEFAULT(MountpointInterface); public: - DriveTraitPtr A() { return mA; } - DriveTraitPtr B() { return mB; } - DriveTraitPtr C() { return mC; } - DriveTraitPtr D() { return mD; } + DriveTrait& A() { return mA; } + DriveTrait& B() { return mB; } + DriveTrait& C() { return mC; } + DriveTrait& D() { return mD; } - DriveTraitPtr* GetAddressOf(Int32 index) { + DriveTraitPtr GetAddressOf(Int32 index) { DbgLastError() = kErrorSuccess; switch (index) { @@ -102,7 +102,7 @@ class MountpointInterface final { } private: - DriveTraitPtr mA, mB, mC, mD = nullptr; + DriveTrait mA, mB, mC, mD; }; /// @brief Unimplemented drive. diff --git a/Private/KernelKit/PEFCodeManager.hxx b/Private/KernelKit/PEFCodeManager.hxx index 80ac6e90..a928e89e 100644 --- a/Private/KernelKit/PEFCodeManager.hxx +++ b/Private/KernelKit/PEFCodeManager.hxx @@ -50,7 +50,7 @@ class PEFLoader : public LoaderInterface { }; namespace Utils { -bool execute_from_image(PEFLoader &exec) noexcept; +bool execute_from_image(PEFLoader &exec, const Int32& procKind) noexcept; } // namespace Utils } // namespace NewOS |
