qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sheepdog: Fix error message if failed to load vmstate
@ 2015-06-02  9:32 Fam Zheng
  2015-06-02  9:45 ` Kevin Wolf
  2015-06-02 10:16 ` Michael Tokarev
  0 siblings, 2 replies; 6+ messages in thread
From: Fam Zheng @ 2015-06-02  9:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-trivial, Jeff Cody, qemu-block

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/sheepdog.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index bd7cbed..a22f838 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2556,7 +2556,11 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
         }
 
         if (ret < 0) {
-            error_report("failed to save vmstate %s", strerror(errno));
+            if (load) {
+                error_report("failed to load vmstate %s", strerror(errno));
+            } else {
+                error_report("failed to save vmstate %s", strerror(errno));
+            }
             goto cleanup;
         }
 
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-02 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02  9:32 [Qemu-devel] [PATCH] sheepdog: Fix error message if failed to load vmstate Fam Zheng
2015-06-02  9:45 ` Kevin Wolf
2015-06-02 10:22   ` Fam Zheng
2015-06-02 10:16 ` Michael Tokarev
2015-06-02 10:26   ` Fam Zheng
2015-06-02 19:16     ` [Qemu-devel] [Qemu-block] " John Snow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).