diff options
author | Simon Glass <sjg@chromium.org> | 2014-02-27 13:26:23 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-03-17 20:05:49 -0600 |
commit | ab839dc3e6c1d07bc926199f3eebace0804f2ecf (patch) | |
tree | 831168b1d78c5ba25177e8baa78fad1c285b4a2e /arch/sandbox/include/asm | |
parent | ffb87905cb3883c84598b87ca05384c17d59dee1 (diff) |
sandbox: Add options to clean up temporary files
When jumping from one sandbox U-Boot to another in sandbox, the RAM buffer
is preserved in the jump by using a temporary file. Add an option to tell
the receiving U-Boot to remove this file when it is no longer needed.
Similarly the old U-Boot image is left behind in this case. We cannot delete
it immediately since gdb cannot then find its debug symbols. Delete it just
before exiting.
Together these changes ensure that temporary files are removed both for
memory and U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r-- | arch/sandbox/include/asm/state.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index 56bd9a07b62..d17a82e90fc 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -54,10 +54,11 @@ struct sandbox_state { const char *parse_err; /* Error to report from parsing */ int argc; /* Program arguments */ char **argv; /* Command line arguments */ - bool jumped; /* Jumped from previous U_Boot */ + const char *jumped_fname; /* Jumped from previous U_Boot */ uint8_t *ram_buf; /* Emulated RAM buffer */ unsigned int ram_size; /* Size of RAM buffer */ const char *ram_buf_fname; /* Filename to use for RAM buffer */ + bool ram_buf_rm; /* Remove RAM buffer file after read */ bool write_ram_buf; /* Write RAM buffer on exit */ const char *state_fname; /* File containing sandbox state */ void *state_fdt; /* Holds saved state for sandbox */ |