diff options
Diffstat (limited to 'dev/boot/BootKit/HW/SATA.h')
| -rw-r--r-- | dev/boot/BootKit/HW/SATA.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/dev/boot/BootKit/HW/SATA.h b/dev/boot/BootKit/HW/SATA.h index 4073d959..7e84c061 100644 --- a/dev/boot/BootKit/HW/SATA.h +++ b/dev/boot/BootKit/HW/SATA.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ @@ -9,38 +9,30 @@ #include <CompilerKit/CompilerKit.h> #include <modules/AHCI/AHCI.h> -class BootDeviceSATA final -{ -public: - explicit BootDeviceSATA() noexcept; - ~BootDeviceSATA() = default; +class BootDeviceSATA final { + public: + explicit BootDeviceSATA() noexcept; + ~BootDeviceSATA() = default; - NE_COPY_DEFAULT(BootDeviceSATA) + NE_COPY_DEFAULT(BootDeviceSATA) - struct SATATrait final - { - Kernel::SizeT mBase{1024}; - Kernel::Boolean mErr{false}; - Kernel::Boolean mDetected{false}; + struct SATATrait final { + Kernel::SizeT mBase{1024}; + Kernel::Boolean mErr{false}; + Kernel::Boolean mDetected{false}; - operator bool() - { - return !this->mErr; - } - }; + operator bool() { return !this->mErr; } + }; - operator bool() - { - return this->Leak().mDetected; - } + operator bool() { return this->Leak().mDetected; } - BootDeviceSATA& Read(Kernel::WideChar* Buf, const Kernel::SizeT SecCount); - BootDeviceSATA& Write(Kernel::WideChar* Buf, const Kernel::SizeT SecCount); + BootDeviceSATA& Read(Kernel::WideChar* Buf, const Kernel::SizeT SecCount); + BootDeviceSATA& Write(Kernel::WideChar* Buf, const Kernel::SizeT SecCount); - SATATrait& Leak(); + SATATrait& Leak(); -private: - SATATrait mTrait; + private: + SATATrait mTrait; }; #define kAHCISectorSz 4096 |
