diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-29 11:29:45 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-29 11:29:45 +0100 |
| commit | fd8093b6acef79e532a2275acb6581678e28e385 (patch) | |
| tree | 6136a29d27efcf82dffd68a4e15489ad81adf6ed /dev/Kernel | |
| parent | 83de1721b5c35df8e5e8d37ad5a9359d72036fe2 (diff) | |
META: Reformat SATA.cc
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/SATA.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dev/Kernel/HALKit/AMD64/Storage/SATA.cc b/dev/Kernel/HALKit/AMD64/Storage/SATA.cc index e989a8b6..2642faad 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/SATA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/SATA.cc @@ -64,18 +64,19 @@ static Kernel::Void drv_calculate_disk_geometry() noexcept { kCurrentDiskSectorCount = 0UL; - Kernel::UInt8 identify_data[256] = {0}; + Kernel::UInt16 identify_data[256] = {0}; drv_std_input_output<NO, YES, YES>(0, identify_data, 0, 256); - uint32_t lba28_sectors = (identify_data[61] << 16) | identify_data[60]; + Kernel::UInt32 lba28_sectors = (identify_data[61] << 16) | identify_data[60]; kCurrentDiskSectorCount = lba28_sectors; - int i; + Kernel::UInt32 i = 0; for (i = 0; i < 20; i++) - { // 20 words = 40 bytes + { + // 20 words = 40 bytes kModel[i * 2] = identify_data[27 + i] >> 8; // High byte first kModel[i * 2 + 1] = identify_data[27 + i] & 0xFF; // Low byte } |
