From ec48fd7d9386246cd9c5d01c157c2429c15aabcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 15 Nov 2012 14:25:09 +0100 Subject: [PATCH] virsh: save: report an error if XML file can't be read Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868 (cherry picked from commit 58110b48870b4e8efd1d833e3ecbef41b62d1877) --- tools/virsh-domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 505169bddf..123afdead3 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2933,8 +2933,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)