Add command line flag to show list of snapshots.
This patch introduces the flag '-snapshot-list', which causes the
emulator to output a table of snapshots in the currently mounted
snapshot storage file.
The snapshot file is accessed with a very simple driver for the Qcow2
file system, independent of Qemu's block driver framework. This way,
the flag is available in the emulator-ui builds as well. Using Qemu's
framework would have resulted in adding a lot of Qemu dependencies to
the UI build, which we are explicitly trying to avoid.
Change-Id: I059b9ac53e2f8e051757a5c637761eccf8ea17cb
diff --git a/android/help.c b/android/help.c
index 17e7a90..f589b3e 100644
--- a/android/help.c
+++ b/android/help.c
@@ -700,6 +700,21 @@
);
}
+static void
+help_snapshot_list(stralloc_t* out)
+{
+ PRINTF(
+ " This prints a table of snapshots that are stored in the snapshot storage\n"
+ " file that the emulator was started with, then exits. Values from the 'ID'\n"
+ " and 'TAG' columns can be used as arguments for the '-snapshot' parameter.\n\n"
+
+ " If '-snapstorage <file>' was specified as well, this command prints a "
+ " table of the snapshots stored in <file>.\n\n"
+
+ " See '-help-snapshot' for more information on snapshots.\n\n"
+ );
+}
+
#endif
static void