aboutsummaryrefslogtreecommitdiff
path: root/src/disk.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-22 20:37:44 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-03-22 20:37:44 -0400
commitfad2da831d14ae49a6368ece19b8b6a967a773e9 (patch)
tree346629a2d23f5da59094927515b82013be46a6c7 /src/disk.c
parentdfa165052c4eca5d90ecf9e44803791f428a4068 (diff)
downloadseabios-hppa-fad2da831d14ae49a6368ece19b8b6a967a773e9.zip
seabios-hppa-fad2da831d14ae49a6368ece19b8b6a967a773e9.tar.gz
seabios-hppa-fad2da831d14ae49a6368ece19b8b6a967a773e9.tar.bz2
Fix disk_1301 handler.
regs->ah was getting clobbered in call to disk_ret().
Diffstat (limited to 'src/disk.c')
-rw-r--r--src/disk.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/disk.c b/src/disk.c
index 74c49bf..152315e 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -142,7 +142,8 @@ emu_access(struct bregs *regs, u8 device, u16 command)
, MAKE_32_PTR(segment, offset), before*512);
irq_disable();
if (status != 0) {
- BX_INFO("int13_harddisk: function %02x, error %02x !\n",regs->ah,status);
+ BX_INFO("int13_harddisk: function %02x, error %02x !\n"
+ , regs->ah, status);
regs->al = 0;
disk_ret(regs, DISK_RET_EBADTRACK);
}
@@ -222,8 +223,10 @@ disk_1300(struct bregs *regs, u8 device)
static void
disk_1301(struct bregs *regs, u8 device)
{
- regs->ah = GET_BDA(disk_last_status);
- disk_ret(regs, DISK_RET_SUCCESS);
+ u8 v = GET_BDA(disk_last_status);
+ regs->ah = v;
+ set_cf(regs, v);
+ // XXX - clear disk_last_status?
}
// read disk sectors