don't overwrite log actions per device if default is unchanged
- after parsing command line only update actions if default has changed - bx_init_hardware(): extra update of log actions in quick start mode not needed
This commit is contained in:
parent
7d32178e72
commit
addd85e408
@ -1646,17 +1646,22 @@ int bx_read_configuration(const char *rcfile)
|
||||
|
||||
int bx_parse_cmdline(int arg, int argc, char *argv[])
|
||||
{
|
||||
//if (arg < argc) BX_INFO (("parsing command line arguments"));
|
||||
int level, def_action[N_LOGLEV];
|
||||
|
||||
for (level=0; level<N_LOGLEV; level++) {
|
||||
def_action[level] = SIM->get_default_log_action(level);
|
||||
}
|
||||
while (arg < argc) {
|
||||
BX_INFO (("parsing arg %d, %s", arg, argv[arg]));
|
||||
parse_line_unformatted("cmdline args", argv[arg]);
|
||||
arg++;
|
||||
}
|
||||
// update log actions
|
||||
for (int level=0; level<N_LOGLEV; level++) {
|
||||
// update log actions if default has been changed
|
||||
for (level=0; level<N_LOGLEV; level++) {
|
||||
int action = SIM->get_default_log_action(level);
|
||||
io->set_log_action(level, action);
|
||||
if (action != def_action[level]) {
|
||||
io->set_log_action(level, action);
|
||||
}
|
||||
}
|
||||
bx_set_log_actions_by_device(0);
|
||||
return 0;
|
||||
|
@ -1113,13 +1113,6 @@ void bx_init_hardware()
|
||||
{
|
||||
// all configuration has been read, now initialize everything.
|
||||
|
||||
if (SIM->get_param_enum(BXPN_BOCHS_START)->get()==BX_QUICK_START) {
|
||||
for (int level=0; level<N_LOGLEV; level++) {
|
||||
int action = SIM->get_default_log_action(level);
|
||||
io->set_log_action(level, action);
|
||||
}
|
||||
}
|
||||
|
||||
bx_pc_system.initialize(SIM->get_param_num(BXPN_IPS)->get());
|
||||
|
||||
if (SIM->get_param_string(BXPN_LOG_FILENAME)->getptr()[0]!='-') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user