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

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868
This commit is contained in:
Ján Tomko 2012-11-15 14:25:09 +01:00 committed by Eric Blake
parent 2bbe624e1d
commit 58110b4887

View File

@ -2966,8 +2966,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)