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>
state->ram_buf_fname = NULL;
}
- ret = sandbox_read_state(state, state->state_fname);
- if (ret)
- goto err;
+ if (state->read_state && state->state_fname) {
+ ret = sandbox_read_state(state, state->state_fname);
+ if (ret)
+ goto err;
+ }
if (state->handle_signals) {
ret = os_setup_signal_handlers();
printf("Failed to write sandbox state\n");
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 */