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

Eric Blake eblake at redhat.com
Fri Nov 16 05:21:52 UTC 2012


On 11/15/2012 06:25 AM, Ján Tomko wrote:
> Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868
> ---
>  tools/virsh-domain.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

ACK and pushed.

> 
> 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)
> 

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121115/e3605391/attachment-0001.sig>


More information about the libvir-list mailing list