setprefix -> put
This commit is contained in:
parent
6af3f5bd9f
commit
a06b031dcf
@ -248,7 +248,7 @@ public:
|
||||
void ldebug(char *fmt, ...);
|
||||
void fatal (char *prefix, char *fmt, va_list ap);
|
||||
void ask (int level, char *prefix, char *fmt, va_list ap);
|
||||
void setprefix(char *);
|
||||
void put(char *);
|
||||
void settype(int);
|
||||
void setio(class iofunctions *);
|
||||
void setonoff(int loglev, int value) {
|
||||
|
@ -9,7 +9,7 @@ bx_generic_apic_c *apic_index[APIC_MAX_ID];
|
||||
bx_generic_apic_c::bx_generic_apic_c ()
|
||||
{
|
||||
id = APIC_UNKNOWN_ID;
|
||||
setprefix("APIC?");
|
||||
put("APIC?");
|
||||
settype(APICLOG);
|
||||
hwreset ();
|
||||
}
|
||||
@ -272,10 +272,10 @@ void bx_local_apic_c::set_id (Bit8u newid) {
|
||||
if (id >= 0 && id <= 15) {
|
||||
char buffer[16];
|
||||
sprintf (buffer, "APIC%x", id);
|
||||
setprefix(buffer);
|
||||
put(buffer);
|
||||
settype(CPU0LOG + id);
|
||||
sprintf (buffer, "CPU%x", id);
|
||||
cpu->setprefix (buffer);
|
||||
cpu->put (buffer);
|
||||
} else {
|
||||
BX_INFO (("naming convention for apics requires id=0-15 only"));
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ BX_CPU_C::BX_CPU_C()
|
||||
// in case of SMF, you cannot reference any member data
|
||||
// in the constructor because the only access to it is via
|
||||
// global variables which aren't initialized quite yet.
|
||||
setprefix("CPU");
|
||||
put("CPU");
|
||||
settype (CPU0LOG);
|
||||
}
|
||||
|
||||
|
@ -626,7 +626,7 @@ BX_CPU_C::VERR_Ew(BxInstruction_t *i)
|
||||
return;
|
||||
}
|
||||
set_ZF(1); /* accessible */
|
||||
BX_INFO(("VERR: data segment OK"));
|
||||
BX_ERROR(("VERR: data segment OK"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ bx_disassemble_c bx_disassemble;
|
||||
|
||||
bx_disassemble_c::bx_disassemble_c(void)
|
||||
{
|
||||
setprefix("DIS");
|
||||
put("DIS");
|
||||
settype(DISLOG);
|
||||
|
||||
sreg_mod01_rm32[0] = "DS";
|
||||
|
@ -198,7 +198,7 @@ bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv,
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
UNUSED(window_name);
|
||||
th->setprefix("BGUI");
|
||||
th->put("BGUI");
|
||||
|
||||
if (bx_options.Oprivate_colormap->get ()) {
|
||||
BX_INFO(( "BeOS: private_colormap option not handled yet."));
|
||||
|
@ -43,7 +43,7 @@ bx_gui_c bx_gui;
|
||||
|
||||
bx_gui_c::bx_gui_c(void)
|
||||
{
|
||||
setprefix("GUI"); // Init in specific_init
|
||||
put("GUI"); // Init in specific_init
|
||||
settype(GUILOG);
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ void CreateWindows(void)
|
||||
void bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y)
|
||||
{
|
||||
th->setprefix("MGUI");
|
||||
th->put("MGUI");
|
||||
InitToolbox();
|
||||
|
||||
//SouixWin = FrontWindow();
|
||||
|
@ -59,7 +59,7 @@
|
||||
bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y)
|
||||
{
|
||||
th->setprefix("NGUI");
|
||||
th->put("NGUI");
|
||||
UNUSED(th);
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* gui/siminterface.cc
|
||||
* $Id: siminterface.cc,v 1.31 2001-06-22 13:37:08 bdenney Exp $
|
||||
* $Id: siminterface.cc,v 1.32 2001-06-27 19:16:01 fries Exp $
|
||||
*
|
||||
* Defines the actual link between bx_simulator_interface_c methods
|
||||
* and the simulator. This file includes bochs.h because it needs
|
||||
@ -100,7 +100,7 @@ bx_real_sim_c::get_param_string (bx_id id) {
|
||||
void init_siminterface ()
|
||||
{
|
||||
siminterface_log = new logfunctions ();
|
||||
siminterface_log->setprefix ("CTRL");
|
||||
siminterface_log->put ("CTRL");
|
||||
siminterface_log->settype(CTRLLOG);
|
||||
if (SIM == NULL)
|
||||
SIM = new bx_real_sim_c();
|
||||
|
@ -116,7 +116,7 @@ bx_gui_c::sighandler(int signo)
|
||||
bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y)
|
||||
{
|
||||
th->setprefix("TGUI");
|
||||
th->put("TGUI");
|
||||
UNUSED(th);
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
|
@ -262,7 +262,7 @@ void terminateEmul(int reason) {
|
||||
void bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned
|
||||
tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y) {
|
||||
th->setprefix("WGUI");
|
||||
th->put("WGUI");
|
||||
static RGBQUAD black_quad={ 0, 0, 0, 0};
|
||||
stInfo.kill = 0;
|
||||
stInfo.UIinited = FALSE;
|
||||
|
@ -279,7 +279,7 @@ bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned tilewidth,
|
||||
unsigned long plane_masks_return[1];
|
||||
XColor color;
|
||||
|
||||
th->setprefix("XGUI");
|
||||
th->put("XGUI");
|
||||
UNUSED(th);
|
||||
|
||||
if (bx_options.Oprivate_colormap->get ()) {
|
||||
|
@ -179,7 +179,7 @@ int GetCDCapacity(unsigned int hid, unsigned int tid, unsigned int lun)
|
||||
|
||||
cdrom_interface::cdrom_interface(char *dev)
|
||||
{
|
||||
setprefix("CD");
|
||||
put("CD");
|
||||
settype(CDLOG);
|
||||
fd = -1; // File descriptor not yet allocated
|
||||
|
||||
|
@ -44,7 +44,7 @@ bx_cmos_c bx_cmos;
|
||||
|
||||
bx_cmos_c::bx_cmos_c(void)
|
||||
{
|
||||
setprefix("CMOS");
|
||||
put("CMOS");
|
||||
settype(CMOSLOG);
|
||||
BX_DEBUG(("Init."));
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ bx_devices_c bx_devices;
|
||||
// constructor for bx_devices_c
|
||||
bx_devices_c::bx_devices_c(void)
|
||||
{
|
||||
setprefix("DEV");
|
||||
put("DEV");
|
||||
settype(DEVLOG);
|
||||
unsigned i;
|
||||
|
||||
@ -230,11 +230,11 @@ bx_devices_c::port92_read(Bit32u address, unsigned io_len)
|
||||
UNUSED(this_ptr);
|
||||
#endif // !BX_USE_DEV_SMF
|
||||
if (io_len > 1)
|
||||
BX_PANIC(("devices.c: port 92h: io read from address %08x, len=%u",
|
||||
BX_PANIC(("port 92h: io read from address %08x, len=%u",
|
||||
(unsigned) address, (unsigned) io_len));
|
||||
|
||||
BX_INFO(("devices: port92h read partially supported!!!"));
|
||||
BX_INFO(("devices: returning %02x", (unsigned) (BX_GET_ENABLE_A20() << 1)));
|
||||
BX_DEBUG(("port92h read partially supported!!!"));
|
||||
BX_DEBUG((" returning %02x", (unsigned) (BX_GET_ENABLE_A20() << 1)));
|
||||
return(BX_GET_ENABLE_A20() << 1);
|
||||
}
|
||||
|
||||
@ -257,12 +257,12 @@ bx_devices_c::port92_write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
Boolean bx_cpu_reset;
|
||||
|
||||
if (io_len > 1)
|
||||
BX_PANIC(("devices.c: port 92h: io read from address %08x, len=%u",
|
||||
BX_PANIC(("port 92h: io read from address %08x, len=%u",
|
||||
(unsigned) address, (unsigned) io_len));
|
||||
|
||||
BX_INFO(("devices: port92h write of %02x partially supported!!!",
|
||||
BX_DEBUG(("port92h write of %02x partially supported!!!",
|
||||
(unsigned) value));
|
||||
BX_INFO(("devices: A20: set_enable_a20() called"));
|
||||
BX_DEBUG(("A20: set_enable_a20() called"));
|
||||
BX_SET_ENABLE_A20( (value & 0x02) >> 1 );
|
||||
BX_INFO(("A20: now %u", (unsigned) BX_GET_ENABLE_A20()));
|
||||
bx_cpu_reset = (value & 0x01); /* high speed reset */
|
||||
|
@ -41,7 +41,7 @@ bx_dma_c bx_dma;
|
||||
|
||||
bx_dma_c::bx_dma_c(void)
|
||||
{
|
||||
setprefix("DMA");
|
||||
put("DMA");
|
||||
settype(DMALOG);
|
||||
BX_DEBUG(("Init."));
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ extern "C" {
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <net/bpf.h>
|
||||
#include <errno.h>
|
||||
};
|
||||
|
||||
#define BX_BPF_POLL 1000 // Poll for a frame every 1000 usecs
|
||||
@ -146,9 +147,12 @@ bx_fbsd_pktmover_c::bx_fbsd_pktmover_c(const char *netif,
|
||||
do {
|
||||
(void)sprintf(device, "/dev/bpf%d", n++);
|
||||
this->bpf_fd = open(device, O_RDWR);
|
||||
} while (this->bpf_fd < 0);
|
||||
BX_INFO(("tried %s, returned %d",device,this->bpf_fd));
|
||||
if(errno == EACCES)
|
||||
break;
|
||||
} while (this->bpf_fd == -1);
|
||||
|
||||
if (this->bpf_fd < 0) {
|
||||
if (this->bpf_fd == -1) {
|
||||
BX_INFO(("eth_freebsd: could not open packet filter"));
|
||||
return;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ bx_floppy_ctrl_c bx_floppy;
|
||||
|
||||
bx_floppy_ctrl_c::bx_floppy_ctrl_c(void)
|
||||
{
|
||||
setprefix("FDD");
|
||||
put("FDD");
|
||||
settype(FDLOG);
|
||||
BX_DEBUG(("Init."));
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ bx_g2h_c bx_g2h;
|
||||
|
||||
bx_g2h_c::bx_g2h_c(void)
|
||||
{
|
||||
setprefix("G2H");
|
||||
put("G2H");
|
||||
settype(G2HLOG);
|
||||
unsigned i;
|
||||
|
||||
|
@ -64,7 +64,7 @@ static unsigned curr_multiple_sectors = 0; // was 0x3f
|
||||
|
||||
bx_hard_drive_c::bx_hard_drive_c(void)
|
||||
{
|
||||
setprefix("HD");
|
||||
put("HD");
|
||||
settype(HDLOG);
|
||||
#if EXTERNAL_DISK_SIMULATOR
|
||||
s[0].hard_drive = new EXTERNAL_DISK_SIMULATOR_CLASS();
|
||||
|
@ -28,7 +28,7 @@ bx_io_redirect_entry_t::sprintf_self (char *buf)
|
||||
bx_ioapic_c::bx_ioapic_c ()
|
||||
: bx_generic_apic_c ()
|
||||
{
|
||||
setprefix("IOAP");
|
||||
put("IOAP");
|
||||
settype(IOAPICLOG);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ bx_keyb_c::bx_keyb_c(void)
|
||||
// constructor
|
||||
// should zero out state info here???
|
||||
memset( &s, 0, sizeof(s) );
|
||||
BX_KEY_THIS setprefix("KBD");
|
||||
BX_KEY_THIS put("KBD");
|
||||
BX_KEY_THIS settype(KBDLOG);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ bx_ne2k_c bx_ne2k;
|
||||
|
||||
bx_ne2k_c::bx_ne2k_c(void)
|
||||
{
|
||||
setprefix("NE2K");
|
||||
put("NE2K");
|
||||
settype(NE2KLOG);
|
||||
// nothing for now
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ bx_parallel_c bx_parallel;
|
||||
|
||||
bx_parallel_c::bx_parallel_c(void)
|
||||
{
|
||||
setprefix("PAR");
|
||||
put("PAR");
|
||||
settype(PARLOG);
|
||||
// nothing for now
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ bx_pci_c bx_pci;
|
||||
|
||||
bx_pci_c::bx_pci_c(void)
|
||||
{
|
||||
setprefix("PCI");
|
||||
put("PCI");
|
||||
settype(PCILOG);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ bx_pic_c bx_pic;
|
||||
|
||||
bx_pic_c::bx_pic_c(void)
|
||||
{
|
||||
setprefix("PIC");
|
||||
put("PIC");
|
||||
settype(PICLOG);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ bx_pit_c bx_pit;
|
||||
|
||||
bx_pit_c::bx_pit_c( void )
|
||||
{
|
||||
setprefix("PIT");
|
||||
put("PIT");
|
||||
settype(PITLOG);
|
||||
memset(&s, 0, sizeof(s));
|
||||
|
||||
|
@ -38,7 +38,7 @@ bx_pit2_c bx_pit2;
|
||||
|
||||
bx_pit2_c::bx_pit2_c( void )
|
||||
{
|
||||
setprefix("PIT");
|
||||
put("PIT");
|
||||
settype(PITLOG);
|
||||
s.speaker_data_on=0;
|
||||
|
||||
|
@ -48,7 +48,7 @@ bx_sb16_c bx_sb16;
|
||||
|
||||
bx_sb16_c::bx_sb16_c(void)
|
||||
{
|
||||
setprefix("SB16");
|
||||
put("SB16");
|
||||
settype(SB16LOG);
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,11 @@ static int tty_id;
|
||||
|
||||
bx_serial_c::bx_serial_c(void)
|
||||
{
|
||||
setprefix("SER");
|
||||
put("SER");
|
||||
settype(SERLOG);
|
||||
#ifdef SERIAL_ENABLE
|
||||
tty_id = open("/tmp/fifo",O_RDWR|O_NONBLOCK,600);
|
||||
tty_id = open("/dev/ttyqf",O_RDWR|O_NONBLOCK,600);
|
||||
BX_DEBUG(("tty_id: %d",tty_id));
|
||||
tcgetattr(tty_id, &term_orig);
|
||||
bcopy((caddr_t) &term_orig, (caddr_t) &term_new, sizeof(struct termios));
|
||||
cfmakeraw(&term_new);
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
serial_raw::serial_raw (char *ttypath, int signal)
|
||||
{
|
||||
setprefix ("SERR");
|
||||
put ("SERR");
|
||||
settype (SERRLOG);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ bx_unmapped_c bx_unmapped;
|
||||
|
||||
bx_unmapped_c::bx_unmapped_c(void)
|
||||
{
|
||||
setprefix("UNMP");
|
||||
put("UNMP");
|
||||
settype(UNMAPLOG);
|
||||
s.port80 = 0x00;
|
||||
s.port8e = 0x00;
|
||||
|
@ -42,7 +42,7 @@ bx_vga_c::bx_vga_c(void)
|
||||
BX_VGA_THIS s.vga_mem_updated = 0;
|
||||
BX_VGA_THIS s.x_tilesize = X_TILESIZE;
|
||||
BX_VGA_THIS s.y_tilesize = Y_TILESIZE;
|
||||
BX_VGA_THIS setprefix("VGA");
|
||||
BX_VGA_THIS put("VGA");
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ iofunctions::init(void) {
|
||||
n_logfn = 0;
|
||||
init_log(stderr);
|
||||
log = new logfunc_t(this);
|
||||
LOG_THIS setprefix("IO");
|
||||
LOG_THIS put("IO");
|
||||
LOG_THIS settype(IOLOG);
|
||||
BX_DEBUG(("Init(log file: '%s').",logfn));
|
||||
}
|
||||
@ -183,7 +183,7 @@ iofunctions::~iofunctions(void)
|
||||
|
||||
logfunctions::logfunctions(void)
|
||||
{
|
||||
setprefix(" ");
|
||||
put(" ");
|
||||
settype(GENLOG);
|
||||
if(io == NULL && Allocio == 0) {
|
||||
Allocio = 1;
|
||||
@ -198,7 +198,7 @@ logfunctions::logfunctions(void)
|
||||
|
||||
logfunctions::logfunctions(iofunc_t *iofunc)
|
||||
{
|
||||
setprefix(" ");
|
||||
put(" ");
|
||||
settype(GENLOG);
|
||||
setio(iofunc);
|
||||
// BUG: unfortunately this can be called before the bochsrc is read,
|
||||
@ -221,7 +221,7 @@ logfunctions::setio(iofunc_t *i)
|
||||
}
|
||||
|
||||
void
|
||||
logfunctions::setprefix(char *p)
|
||||
logfunctions::put(char *p)
|
||||
{
|
||||
char *tmpbuf;
|
||||
tmpbuf=strdup("[ ]");// if we ever have more than 32 chars,
|
||||
|
@ -46,7 +46,7 @@ BX_MEM_C::BX_MEM_C(void)
|
||||
{
|
||||
char mem[6];
|
||||
snprintf(mem, 6, "MEM%d", BX_SIM_ID);
|
||||
setprefix(mem);
|
||||
put(mem);
|
||||
settype(MEMLOG);
|
||||
|
||||
vector = NULL;
|
||||
|
@ -45,7 +45,7 @@ const Bit64u bx_pc_system_c::COUNTER_INTERVAL = 100000;
|
||||
// constructor
|
||||
bx_pc_system_c::bx_pc_system_c(void)
|
||||
{
|
||||
this->setprefix("SYS");
|
||||
this->put("SYS");
|
||||
|
||||
num_timers = 0;
|
||||
// set ticks period and remaining to max Bit32u value
|
||||
|
@ -101,7 +101,7 @@ void
|
||||
state_file::init(void)
|
||||
{
|
||||
log = new class logfunctions();
|
||||
log->setprefix("STAT");
|
||||
log->put("STAT");
|
||||
log->settype(GENLOG);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user