aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-11 19:40:44 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-03-11 19:40:44 -0400
commita69bc3a94fd28edd957e0d201432b566b700ca2b (patch)
tree49fb638a24df166318c476c3418f44ff9516d4a3 /src
parent83b56406ed945a81d01d99f7180d06679dd2e247 (diff)
downloadseabios-hppa-a69bc3a94fd28edd957e0d201432b566b700ca2b.zip
seabios-hppa-a69bc3a94fd28edd957e0d201432b566b700ca2b.tar.gz
seabios-hppa-a69bc3a94fd28edd957e0d201432b566b700ca2b.tar.bz2
Fix bug in atapi_get_sense.
Buffer size was in wrong argument position. Clarify code by using sizeof().
Diffstat (limited to 'src')
-rw-r--r--src/cdrom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cdrom.c b/src/cdrom.c
index bef9b77..55db9b5 100644
--- a/src/cdrom.c
+++ b/src/cdrom.c
@@ -296,7 +296,7 @@ atapi_get_sense(u16 device, u8 *asc, u8 *ascq)
atacmd[0] = ATA_CMD_REQUEST_SENSE;
atacmd[4] = sizeof(buffer);
u16 ret = ata_cmd_packet(device, atacmd, sizeof(atacmd)
- , 18L, 0, ATA_DATA_IN, GET_SEG(SS), (u32)buffer);
+ , 0, sizeof(buffer), GET_SEG(SS), (u32)buffer);
if (ret != 0)
return 0x0002;
@@ -332,7 +332,7 @@ atapi_is_ready(u16 device)
return -1;
}
u16 ret = ata_cmd_packet(device, packet, sizeof(packet)
- , 0, 8L, ATA_DATA_IN, GET_SEG(SS), (u32)buf);
+ , 0, sizeof(buf), GET_SEG(SS), (u32)buf);
if (ret == 0)
break;