mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
840d39b9d0
When the Int 13h AH=42h "Extended read" function fails, the disk address packet's LBA block count is reset to the number of blocks that have been successfully transferred. This is more or less fine, unless one wants to ensure the exact number of sectors gets read. If the function fails so that zero sectors were read, the retry loop is restarted, but with the packet's LBA block count member reset, as per the documentation. (In this example, it is reset to zero.) Then, at the next retry attempt, zero sectors are requested to be read, and this time of course, the call succeeds... Wrongly, of course, this is not what's expected. Therefore, for each retry, the LBA block count member should be set again to the correct number of sectors to read. There are maximum 3 retries, so the retry loop will stop anyway, but the LBA read will now correctly fail and return FALSE, as expected. This problem doesn't exist in the retry loop for the Int 13h, AH=02h "Read Disk Sectors" CHS function, because here, the call is made only using registers, and we use a pair of RegsIn/RegsOut. RegsOut receives the modified register values, but the input RegsIn stays unchanged. |
||
---|---|---|
.. | ||
bootsect | ||
fdebug | ||
freeldr | ||
install | ||
tools | ||
CMakeLists.txt | ||
FREELDR.INI | ||
notes.txt |