diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-21 09:23:13 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-21 09:23:13 +0200 |
| commit | 27fd1ba438eecbe184a5deda6d9f468509ec4f42 (patch) | |
| tree | 1ef5c34198aee313b7f5e297a13d169c4f1bd6b1 /dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | |
| parent | e5edad799f0f8dbe0b34baf55c30849c941a43f9 (diff) | |
feat: refactor and fixed python scripts.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index 3363e809..77e3331d 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -294,7 +294,8 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz goto ahci_io_end; } else { kout << "ahci: Disk still busy after command completion!\r"; - while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq)); + while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq)) + ; } ahci_io_end: @@ -307,15 +308,13 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz @brief Gets the number of sectors inside the drive. @return Sector size in bytes. */ -STATIC ATTRIBUTE(unused) -SizeT drv_get_sector_count_ahci() { +STATIC ATTRIBUTE(unused) SizeT drv_get_sector_count_ahci() { return kSATASectorCount; } /// @brief Get the drive size. /// @return Disk size in bytes. -STATIC ATTRIBUTE(unused) -SizeT drv_get_size_ahci() { +STATIC ATTRIBUTE(unused) SizeT drv_get_size_ahci() { return drv_std_get_sector_count() * kAHCISectorSize; } |
