projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83b5640
)
Fix bug in atapi_get_sense.
author
Kevin O'Connor
<kevin@koconnor.net>
Tue, 11 Mar 2008 23:40:44 +0000
(19:40 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Tue, 11 Mar 2008 23:40:44 +0000
(19:40 -0400)
Buffer size was in wrong argument position.
Clarify code by using sizeof().
src/cdrom.c
patch
|
blob
|
history
diff --git
a/src/cdrom.c
b/src/cdrom.c
index bef9b7726275bd5cae921c61d35cd3af486bbd0d..55db9b5d0fa1fe57877862a8e82e68e16c2c5662 100644
(file)
--- 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;