diff options
author | David 'Digit' Turner <digit@android.com> | 2011-05-05 10:24:43 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-05-05 10:24:43 +0200 |
commit | d80a7861fe5e21e3dcb80480a77b033e6b307dd5 (patch) | |
tree | cc032e1f277b45a73a940419f31fe9219b6a6acf /android/snapshot.c | |
parent | 240c5cb1a24f5201472067a24c5d1ac54f6b8a20 (diff) | |
download | external_qemu-d80a7861fe5e21e3dcb80480a77b033e6b307dd5.zip external_qemu-d80a7861fe5e21e3dcb80480a77b033e6b307dd5.tar.gz external_qemu-d80a7861fe5e21e3dcb80480a77b033e6b307dd5.tar.bz2 |
Fix -snapshot-list option.
This patch makes -snapshot-list work properly. More specifically:
- If the AVD has snapshotting enabled, the emulator will find the
appropriate file if you don't use -snapstorage.
- If the AVD has no snapshot support, the emulator will print
a user-friendly message to explain that.
- If you're in the Android build, the emulator indicates that
-snapstorage <file> is mandatory.
Bug 4384430
Change-Id: I472b12f50b7f7da5a282b24036083c7598fe48eb
Diffstat (limited to 'android/snapshot.c')
-rw-r--r-- | android/snapshot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/snapshot.c b/android/snapshot.c index 047465f..d02d9a8 100644 --- a/android/snapshot.c +++ b/android/snapshot.c @@ -310,7 +310,7 @@ snapshot_print_and_exit( const char *snapstorage ) { /* open snapshot file */ int fd = open(snapstorage, O_RDONLY); - if (!fd) { + if (fd < 0) { derror("Could not open snapshot file '%s': %s", snapstorage, strerror(errno)); exit(1); } |