From fb790b07aeba8e22e4190cf3e1834d11ecde6c96 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:08:33 +0200 Subject: dev: better .clang-format, ran format command. Signed-off-by: Amlal --- dev/boot/BootKit/HW/ATA.h | 61 ++++++++++++++++++++-------------------------- dev/boot/BootKit/HW/SATA.h | 44 ++++++++++++++------------------- 2 files changed, 44 insertions(+), 61 deletions(-) (limited to 'dev/boot/BootKit/HW') diff --git a/dev/boot/BootKit/HW/ATA.h b/dev/boot/BootKit/HW/ATA.h index 56393125..adb5c899 100644 --- a/dev/boot/BootKit/HW/ATA.h +++ b/dev/boot/BootKit/HW/ATA.h @@ -1,56 +1,47 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #pragma once -#include #include +#include using namespace Kernel; -class BootDeviceATA final : public Device -{ -public: - enum - { - kPrimary = ATA_PRIMARY_IO, - kSecondary = ATA_SECONDARY_IO, - }; +class BootDeviceATA final : public Device { + public: + enum { + kPrimary = ATA_PRIMARY_IO, + kSecondary = ATA_SECONDARY_IO, + }; - explicit BootDeviceATA() noexcept; - ~BootDeviceATA() = default; + explicit BootDeviceATA() noexcept; + ~BootDeviceATA() = default; - enum - { - kSectorSize = kATASectorSize - }; + enum { kSectorSize = kATASectorSize }; - struct ATATrait final : public Device::Trait - { - UInt16 mBus{kPrimary}; - UInt8 mMaster{0}; - Boolean mErr{false}; + struct ATATrait final : public Device::Trait { + UInt16 mBus{kPrimary}; + UInt8 mMaster{0}; + Boolean mErr{false}; - operator bool() - { - return !mErr; - } - }; + operator bool() { return !mErr; } + }; -public: - operator bool(); + public: + operator bool(); - SizeT GetSectorsCount() noexcept; - SizeT GetDiskSize() noexcept; + SizeT GetSectorsCount() noexcept; + SizeT GetDiskSize() noexcept; - BootDeviceATA& Read(Char* Buf, SizeT SecCount) override; - BootDeviceATA& Write(Char* Buf, SizeT SecCount) override; + BootDeviceATA& Read(Char* Buf, SizeT SecCount) override; + BootDeviceATA& Write(Char* Buf, SizeT SecCount) override; - ATATrait& Leak() override; + ATATrait& Leak() override; -private: - ATATrait mTrait; + private: + ATATrait mTrait; }; 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 #include -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 -- cgit v1.2.3