aboutsummaryrefslogtreecommitdiff
path: root/src/disk.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-05-24 23:46:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-05-24 23:46:33 -0400
commitac8df8c1dbdc789454b3739898d16eebc3e7dbff (patch)
tree456a9220fbcd7d2a0d49e880e498f5e0846afe25 /src/disk.c
parent0f803e460e907c4b8ad5c121ea977d30f87b98dc (diff)
downloadseabios-hppa-ac8df8c1dbdc789454b3739898d16eebc3e7dbff.zip
seabios-hppa-ac8df8c1dbdc789454b3739898d16eebc3e7dbff.tar.gz
seabios-hppa-ac8df8c1dbdc789454b3739898d16eebc3e7dbff.tar.bz2
Improve control of debug messages.
Rename BX_INFO() to dprintf() and add a "severity level" parameter. Add CONFIG_DEBUG_LEVEL compile option to control debug verbosity. Add more debug info to init steps of post.c.
Diffstat (limited to 'src/disk.c')
-rw-r--r--src/disk.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/disk.c b/src/disk.c
index 00eec81..ee2c983 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -61,7 +61,7 @@ basic_access(struct bregs *regs, u8 device, u16 command)
u16 head = regs->dh;
if (count > 128 || count == 0 || sector == 0) {
- BX_INFO("int13_harddisk: function %02x, parameter out of range!\n"
+ dprintf(1, "int13_harddisk: function %02x, parameter out of range!\n"
, regs->ah);
disk_ret(regs, DISK_RET_EPARAM);
return;
@@ -69,7 +69,7 @@ basic_access(struct bregs *regs, u8 device, u16 command)
// sanity check on cyl heads, sec
if (cylinder >= nlc || head >= nlh || sector > nlspt) {
- BX_INFO("int13_harddisk: function %02x, parameters out of"
+ dprintf(1, "int13_harddisk: function %02x, parameters out of"
" range %04x/%04x/%04x!\n"
, regs->ah, cylinder, head, sector);
disk_ret(regs, DISK_RET_EPARAM);
@@ -104,7 +104,7 @@ basic_access(struct bregs *regs, u8 device, u16 command)
regs->al = GET_EBDA(ata.trsfsectors);
if (status != 0) {
- BX_INFO("int13_harddisk: function %02x, error %02x !\n"
+ dprintf(1, "int13_harddisk: function %02x, error %02x !\n"
, regs->ah, status);
disk_ret(regs, DISK_RET_EBADTRACK);
}
@@ -119,7 +119,8 @@ extended_access(struct bregs *regs, u8 device, u16 command)
u8 type = GET_EBDA(ata.devices[device].type);
if (type == ATA_TYPE_ATA
&& lba >= GET_EBDA(ata.devices[device].sectors)) {
- BX_INFO("int13_harddisk: function %02x. LBA out of range\n", regs->ah);
+ dprintf(1, "int13_harddisk: function %02x. LBA out of range\n"
+ , regs->ah);
disk_ret(regs, DISK_RET_EPARAM);
return;
}
@@ -148,7 +149,7 @@ extended_access(struct bregs *regs, u8 device, u16 command)
SET_INT13EXT(regs, count, GET_EBDA(ata.trsfsectors));
if (status != 0) {
- BX_INFO("int13_harddisk: function %02x, error %02x !\n"
+ dprintf(1, "int13_harddisk: function %02x, error %02x !\n"
, regs->ah, status);
disk_ret(regs, DISK_RET_EBADTRACK);
return;