libvirt/tools
Eric Blake 64703c03fc snapshot: better virsh handling of missing current, parent
Previously, virsh 'snapshot-parent' and 'snapshot-current' were
completely silent in the case where the code conclusively proved
there was no parent or current snapshot, but differed in exit
status; this silence caused some confusion on whether the commands
worked.  Furthermore, commit d1be48f introduced a regression where
snapshot-parent would leak output about an unknown function, but
only on the first attempt, when talking to an older server that
lacks virDomainSnapshotGetParent.  This changes things to consistenly
report an error message and exit with status 1 when no snapshot
exists, and to avoid leaking unknown function warnings when using
fallbacks.

* tools/virsh.c (vshGetSnapshotParent): Alter signature, to
distinguish between real error and missing parent.  Don't pollute
last_error on success.
(cmdSnapshotParent): Adjust caller.  Always output message on
failure.
(cmdSnapshotList): Adjust caller.
(cmdSnapshotCurrent): Always output message on failure.
2011-10-04 14:36:24 -06:00
..
.gitignore Support automatic creation of leases for disks in sanlock 2011-06-28 18:18:06 +01:00
console.c Avoid using "devname" as an identifier. 2011-09-16 20:49:04 +08:00
console.h Avoid using "devname" as an identifier. 2011-09-16 20:49:04 +08:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt-guests.init.sh save: support bypass-cache flag in libvirt-guests init script 2011-07-21 16:24:09 -06:00
libvirt-guests.sysconf save: support bypass-cache flag in libvirt-guests init script 2011-07-21 16:24:09 -06:00
Makefile.am freebsd: Fix build problem due to picking up the wrong libvirt.h 2011-07-29 07:35:54 -06:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh.c snapshot: better virsh handling of missing current, parent 2011-10-04 14:36:24 -06:00
virsh.pod virsh: Add 'reset' command for virsh 2011-09-29 07:04:14 -06:00
virt-pki-validate.in virt-*-validate.in: quote all variable references 2011-02-21 10:32:34 -07:00
virt-sanlock-cleanup.in sanlock: add missing test command in virt-sanlock-cleanup.in 2011-09-15 09:44:48 -06:00
virt-xml-validate.in virt-*-validate.in: quote all variable references 2011-02-21 10:32:34 -07:00