- fixed some warnings at BX_INFO, BX_PANIC, BX_ERROR and BX_DEBUG
This commit is contained in:
parent
849bb18274
commit
3c769207e2
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cdrom.cc,v 1.46 2002-10-03 21:07:02 bdenney Exp $
|
||||
// $Id: cdrom.cc,v 1.47 2002-10-06 20:19:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -208,7 +208,7 @@ cdrom_interface::cdrom_interface(char *dev)
|
||||
|
||||
void
|
||||
cdrom_interface::init(void) {
|
||||
BX_DEBUG(("Init $Id: cdrom.cc,v 1.46 2002-10-03 21:07:02 bdenney Exp $"));
|
||||
BX_DEBUG(("Init $Id: cdrom.cc,v 1.47 2002-10-06 20:19:03 vruppert Exp $"));
|
||||
BX_INFO(("file = '%s'",path));
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ cdrom_interface::capacity()
|
||||
if (ret) {
|
||||
BX_PANIC (("fstat on cdrom image returned err: %s", strerror(errno)));
|
||||
}
|
||||
BX_INFO (("cdrom size is %d bytes", stat_buf.st_size));
|
||||
BX_INFO (("cdrom size is %lu bytes", stat_buf.st_size));
|
||||
if ((stat_buf.st_size % 2048) != 0) {
|
||||
BX_ERROR (("expected cdrom image to be a multiple of 2048 bytes"));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_linux.cc,v 1.8 2002-10-02 05:16:01 kevinlawton Exp $
|
||||
// $Id: eth_linux.cc,v 1.9 2002-10-06 20:19:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -207,7 +207,7 @@ bx_linux_pktmover_c::bx_linux_pktmover_c(const char *netif,
|
||||
this->filter[3].k = (macaddr[0] & 0xff) << 8 | (macaddr[1] & 0xff);
|
||||
fp.len = BX_LSF_ICNT;
|
||||
fp.filter = this->filter;
|
||||
BX_INFO(("eth_linux: fp.len=%d fp.filter=%lx", fp.len, fp.filter));
|
||||
BX_INFO(("eth_linux: fp.len=%d fp.filter=%x", fp.len, (unsigned) fp.filter));
|
||||
if (setsockopt(this->fd, SOL_SOCKET, SO_ATTACH_FILTER, &fp, sizeof(fp)) < 0) {
|
||||
BX_PANIC(("eth_linux: could not set socket filter: %s", strerror(errno)));
|
||||
close(this->fd);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_null.cc,v 1.8 2002-10-02 05:16:01 kevinlawton Exp $
|
||||
// $Id: eth_null.cc,v 1.9 2002-10-06 20:19:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -108,7 +108,7 @@ bx_null_pktmover_c::sendpkt(void *buf, unsigned io_len)
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
unsigned int n = fwrite (buf, io_len, 1, txlog);
|
||||
if (n != 1) BX_ERROR (("fwrite to txlog failed", io_len));
|
||||
if (n != 1) BX_ERROR (("fwrite to txlog failed, io_len = %u", io_len));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf (txlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
Bit8u *charbuf = (Bit8u *)buf;
|
||||
@ -137,7 +137,7 @@ void bx_null_pktmover_c::rx_timer_handler (void *this_ptr)
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
int n = fwrite (buf, io_len, 1, class_ptr->rxlog);
|
||||
if (n != 1) BX_ERROR (("fwrite to rxlog failed", io_len));
|
||||
if (n != 1) BX_ERROR (("fwrite to rxlog failed, io_len = %u", io_len));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf (class_ptr->rxlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
Bit8u *charbuf = (Bit8u *)buf;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_tap.cc,v 1.6 2002-10-02 05:16:01 kevinlawton Exp $
|
||||
// $Id: eth_tap.cc,v 1.7 2002-10-06 20:19:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -255,7 +255,7 @@ bx_tap_pktmover_c::sendpkt(void *buf, unsigned io_len)
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
int n = fwrite (buf, io_len, 1, txlog);
|
||||
if (n != 1) BX_ERROR (("fwrite to txlog failed", io_len));
|
||||
if (n != 1) BX_ERROR (("fwrite to txlog failed, io_len = %u", io_len));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf (txlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
Bit8u *charbuf = (Bit8u *)buf;
|
||||
@ -307,7 +307,7 @@ void bx_tap_pktmover_c::rx_timer ()
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
int n = fwrite (rxbuf, nbytes, 1, rxlog);
|
||||
if (n != 1) BX_ERROR (("fwrite to rxlog failed", nbytes));
|
||||
if (n != 1) BX_ERROR (("fwrite to rxlog failed, nbytes = %d", nbytes));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf (rxlog_txt, "NE2K received a packet, length %u\n", nbytes);
|
||||
for (n=0; n<nbytes; n++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.cc,v 1.79 2002-10-05 19:40:51 vruppert Exp $
|
||||
// $Id: harddrv.cc,v 1.80 2002-10-06 20:19:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -162,7 +162,7 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
char string[5];
|
||||
|
||||
BX_HD_THIS devices = d;
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.79 2002-10-05 19:40:51 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.80 2002-10-06 20:19:03 vruppert Exp $"));
|
||||
|
||||
for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) {
|
||||
if (bx_options.ata[channel].Opresent->get() == 1) {
|
||||
@ -643,7 +643,7 @@ if ( quantumsMax == 0)
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("multi-sector read reached invalid sector %u, aborting", logical_sector));
|
||||
BX_ERROR(("multi-sector read reached invalid sector %lu, aborting", logical_sector));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
GOTO_RETURN_VALUE ;
|
||||
}
|
||||
@ -655,8 +655,8 @@ if ( quantumsMax == 0)
|
||||
}
|
||||
ret = BX_SELECTED_DRIVE(channel).hard_drive->read((bx_ptr_t) BX_SELECTED_CONTROLLER(channel).buffer, 512);
|
||||
if (ret < 512) {
|
||||
BX_ERROR(("logical sector was %u", (unsigned) logical_sector));
|
||||
BX_ERROR(("could not read() hard drive image file at byte %d", logical_sector*512));
|
||||
BX_ERROR(("logical sector was %lu", logical_sector));
|
||||
BX_ERROR(("could not read() hard drive image file at byte %lu", logical_sector*512));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
GOTO_RETURN_VALUE ;
|
||||
}
|
||||
@ -1126,7 +1126,7 @@ if ( quantumsMax == 0)
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("write reached invalid sector %u, aborting", logical_sector));
|
||||
BX_ERROR(("write reached invalid sector %lu, aborting", logical_sector));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
return;
|
||||
}
|
||||
@ -1135,13 +1135,13 @@ if ( quantumsMax == 0)
|
||||
#endif
|
||||
ret = BX_SELECTED_DRIVE(channel).hard_drive->lseek(logical_sector * 512, SEEK_SET);
|
||||
if (ret < 0) {
|
||||
BX_ERROR(("could not lseek() hard drive image file at byte %u", logical_sector * 512));
|
||||
BX_ERROR(("could not lseek() hard drive image file at byte %lu", logical_sector * 512));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
return;
|
||||
}
|
||||
ret = BX_SELECTED_DRIVE(channel).hard_drive->write((bx_ptr_t) BX_SELECTED_CONTROLLER(channel).buffer, 512);
|
||||
if (ret < 512) {
|
||||
BX_ERROR(("could not write() hard drive image file at byte %d", logical_sector*512));
|
||||
BX_ERROR(("could not write() hard drive image file at byte %lu", logical_sector*512));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
return;
|
||||
}
|
||||
@ -1365,7 +1365,7 @@ if ( quantumsMax == 0)
|
||||
case 0x0e: // CD-ROM audio control
|
||||
case 0x2a: // CD-ROM capabilities & mech. status
|
||||
case 0x3f: // all
|
||||
BX_ERROR(("cdrom: MODE SENSE (chg), code=%x",
|
||||
BX_ERROR(("cdrom: MODE SENSE (chg), code=%x"
|
||||
" not implemented yet",
|
||||
PageCode));
|
||||
atapi_cmd_error(channel, SENSE_ILLEGAL_REQUEST,
|
||||
@ -1810,7 +1810,7 @@ if ( quantumsMax == 0)
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("initial read from sector %u out of bounds, aborting", logical_sector));
|
||||
BX_ERROR(("initial read from sector %lu out of bounds, aborting", logical_sector));
|
||||
command_aborted(channel, value);
|
||||
break;
|
||||
}
|
||||
@ -1825,8 +1825,8 @@ if ( quantumsMax == 0)
|
||||
}
|
||||
ret = BX_SELECTED_DRIVE(channel).hard_drive->read((bx_ptr_t) BX_SELECTED_CONTROLLER(channel).buffer, 512);
|
||||
if (ret < 512) {
|
||||
BX_ERROR(("logical sector was %u", (unsigned) logical_sector));
|
||||
BX_ERROR(("could not read() hard drive image file at byte %d", logical_sector*512));
|
||||
BX_ERROR(("logical sector was %lu", logical_sector));
|
||||
BX_ERROR(("could not read() hard drive image file at byte %lu", logical_sector*512));
|
||||
command_aborted(channel, value);
|
||||
break;
|
||||
}
|
||||
@ -1893,7 +1893,7 @@ if ( quantumsMax == 0)
|
||||
(unsigned) BX_HD_THIS channels[channel].drive_select,
|
||||
(unsigned) BX_SELECTED_CONTROLLER(channel).head_no));
|
||||
if (!BX_SELECTED_IS_PRESENT(channel)) {
|
||||
BX_PANIC(("init drive params: disk ata%d-%d% not present", channel, BX_SLAVE_SELECTED(channel)));
|
||||
BX_PANIC(("init drive params: disk ata%d-%d not present", channel, BX_SLAVE_SELECTED(channel)));
|
||||
//BX_SELECTED_CONTROLLER(channel).error_register = 0x12;
|
||||
BX_SELECTED_CONTROLLER(channel).status.busy = 0;
|
||||
BX_SELECTED_CONTROLLER(channel).status.drive_ready = 1;
|
||||
@ -1903,7 +1903,7 @@ if ( quantumsMax == 0)
|
||||
break;
|
||||
}
|
||||
if (BX_SELECTED_CONTROLLER(channel).sector_count != BX_SELECTED_DRIVE(channel).hard_drive->sectors)
|
||||
BX_PANIC(("init drive params: sector count doesnt match %ld!=%ld", BX_SELECTED_CONTROLLER(channel).sector_count, BX_SELECTED_DRIVE(channel).hard_drive->sectors));
|
||||
BX_PANIC(("init drive params: sector count doesnt match %d!=%d", BX_SELECTED_CONTROLLER(channel).sector_count, BX_SELECTED_DRIVE(channel).hard_drive->sectors));
|
||||
if ( BX_SELECTED_CONTROLLER(channel).head_no != (BX_SELECTED_DRIVE(channel).hard_drive->heads-1) )
|
||||
BX_PANIC(("init drive params: head number doesn't match %d != %d",BX_SELECTED_CONTROLLER(channel).head_no, BX_SELECTED_DRIVE(channel).hard_drive->heads-1));
|
||||
BX_SELECTED_CONTROLLER(channel).status.busy = 0;
|
||||
@ -2103,7 +2103,7 @@ if ( quantumsMax == 0)
|
||||
if (BX_SELECTED_IS_HD(channel)) {
|
||||
BX_DEBUG(("write cmd 0x70 (SEEK) executing"));
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("initial seek to sector %u out of bounds, aborting", logical_sector));
|
||||
BX_ERROR(("initial seek to sector %lu out of bounds, aborting", logical_sector));
|
||||
command_aborted(channel, value);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user