aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/android/main.c b/android/main.c
index c1a4a9f..677980b 100644
--- a/android/main.c
+++ b/android/main.c
@@ -1410,12 +1410,13 @@ int main(int argc, char **argv)
}
if (!opts->no_snapshot) {
+ char* snapshot_name =
+ opts->snapshot ? opts->snapshot : "default-boot";
args[n++] = "-loadvm";
- if (opts->snapshot) {
- args[n++] = opts->snapshot;
- } else {
- // name of state snapshot to load if not specified by user
- args[n++] = "default-boot";
+ args[n++] = snapshot_name;
+ if (!opts->no_snapshot_save) {
+ args[n++] = "-savevm-on-exit";
+ args[n++] = snapshot_name;
}
} else if (opts->snapshot) {
dwarning("option '-no-snapshot' overrides '-snapshot', continuing with boot sequence");