diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-01-03 15:25:06 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-01-03 15:25:06 +0100 |
| commit | bf2fc74c6552f9359955210c8f60e45308ae1d31 (patch) | |
| tree | 903ea813d3ef69b7c5c3a45bc7268fc990d6b191 /dev/Boot/src/HEL/AMD64/BootATA.cc | |
| parent | 4be14ab92ed6456e6d5bec5777fe7df5738112e7 (diff) | |
IMPL: Work In Progress efforts in Journaling and SysChk.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Boot/src/HEL/AMD64/BootATA.cc')
| -rw-r--r-- | dev/Boot/src/HEL/AMD64/BootATA.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dev/Boot/src/HEL/AMD64/BootATA.cc b/dev/Boot/src/HEL/AMD64/BootATA.cc index cdf0d180..4222792f 100644 --- a/dev/Boot/src/HEL/AMD64/BootATA.cc +++ b/dev/Boot/src/HEL/AMD64/BootATA.cc @@ -169,6 +169,8 @@ Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, rt_out16(IO + ATA_REG_DATA, Buf[IndexOff]); boot_ata_wait_io(IO); } + + boot_ata_wait_io(IO); } /// @check is ATA detected? @@ -246,8 +248,11 @@ BootDeviceATA& BootDeviceATA::Write(CharacterTypeUTF8* Buf, const SizeT& SectorS Leak().mErr = false; - if (!Buf || SectorSz < 1) + if (!Buf || SectorSz < 1 || this->Leak().mSize < 1) + { + Leak().mErr = true; return *this; + } boot_ata_write(this->Leak().mBase, this->Leak().mBus, this->Leak().mMaster, Buf, SectorSz, this->Leak().mSize); |
