[PATCH] virsh: save: report an error if XML file can't be read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868
---
 tools/virsh-domain.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 86ed4d3..df38618 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2945,8 +2945,10 @@ doSave(void *opaque)
         goto out;
 
     if (xmlfile &&
-        virFileReadAll(xmlfile, 8192, &xml) < 0)
+        virFileReadAll(xmlfile, 8192, &xml) < 0) {
+        vshReportError(ctl);
         goto out;
+    }
 
     if (((flags || xml)
          ? virDomainSaveFlags(dom, to, xml, flags)
-- 
1.7.8.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]