diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-02-11 09:38:44 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-02-11 09:38:44 -0500 |
commit | b50488bb3912f50ac70055d3fc3200ff2303986b (patch) | |
tree | 3622516c86482658fb899ec1b3a30a4dfed6b3a4 /src/disk.c | |
parent | 26d3144fbf22185c75b10c30988ca33aa8842837 (diff) | |
download | seabios-hppa-b50488bb3912f50ac70055d3fc3200ff2303986b.zip seabios-hppa-b50488bb3912f50ac70055d3fc3200ff2303986b.tar.gz seabios-hppa-b50488bb3912f50ac70055d3fc3200ff2303986b.tar.bz2 |
disk: handle LBA I/O with zero sector count
Unlike basic_access, extended_access does not check for a zero
sector count. However, this is a problem because for example
it would be interpreted as 256 when processing an ATA request.
Based on patch from: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/disk.c')
-rw-r--r-- | src/disk.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -135,6 +135,11 @@ extended_access(struct bregs *regs, struct drive_s *drive_g, u16 command) dop.buf_fl = SEGOFF_TO_FLATPTR(GET_INT13EXT(regs, data)); dop.count = GET_INT13EXT(regs, count); + if (! dop.count) { + // Nothing to do. + disk_ret(regs, DISK_RET_SUCCESS); + return; + } int status = send_disk_op(&dop); |