Skip to contentSkip to conversation

Add error message for loading snapshot without VM state

PATCH In review Kevin Wolf 2 participants 2 messages Mar 1, 2011

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 Add error message for loading snapshot without VM state

It already fails, but it didn't tell the user why.

---
 savevm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
savevm.c +2 -0
index a50fd31..6e026a8 100644
@@ -1996,6 +1996,8 @@ int load_vmstate(const char *name)
     if (ret < 0) {
         return ret;
     } else if (sn.vm_state_size == 0) {
+        error_report("This is a disk-only snapshot. Revert to it offline "
+            "using qemu-img.");
         return -EINVAL;
     }
 
Signature · 1 line
1.7.2.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Kevin Wolf

It already fails, but it didn't tell the user why.

---
 savevm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
savevm.c +0 -0
index a50fd31..6e026a8 100644

savevm.c int load_vmstate(const char *name) · line 2002

Quoted 7 lines
savevm.c +2 -0
@@ -1996,6 +1996,8 @@ int load_vmstate(const char *name)
     if (ret < 0) {
         return ret;
     } else if (sn.vm_state_size == 0) {
+        error_report("This is a disk-only snapshot. Revert to it offline "
+            "using qemu-img.");
         return -EINVAL;
     }