mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-24 23:31:44 +02:00
sandbox: Only read the state if we have a state file
We should not read this unless requested. Make it conditional on the option being provided. Add some debugging to show the state being written. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a64fec9f17
commit
97192937bf
@ -522,9 +522,11 @@ int sandbox_main(int argc, char *argv[])
|
|||||||
state->ram_buf_fname = NULL;
|
state->ram_buf_fname = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sandbox_read_state(state, state->state_fname);
|
if (state->read_state && state->state_fname) {
|
||||||
if (ret)
|
ret = sandbox_read_state(state, state->state_fname);
|
||||||
goto err;
|
if (ret)
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
if (state->handle_signals) {
|
if (state->handle_signals) {
|
||||||
ret = os_setup_signal_handlers();
|
ret = os_setup_signal_handlers();
|
||||||
|
@ -521,6 +521,7 @@ int state_uninit(void)
|
|||||||
printf("Failed to write sandbox state\n");
|
printf("Failed to write sandbox state\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
log_debug("Wrote state to file '%s'\n", state->ram_buf_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete this at the last moment so as not to upset gdb too much */
|
/* Delete this at the last moment so as not to upset gdb too much */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user