Avoid the annoying problem that virDomainFree and virDomainSnapshotFree reset
libvirt errors and thus errors from helper functions don't get reported.
This seriesl also contains other refactors which I noticed along.
Peter Krempa (9):
virsh: Add new file for utility functions and move a few
virsh-util: Move domain lookup helpers into virsh-util
virsh-util: Add wrapper for virDomainFree
virsh: Add wrapper for virDomainSnapshotFree
vsh: Add helper for safe remembering of libvirt errors
virsh: add helpers for getting domain XML for XPath purposes
virsh-domain-monitor: Use the virsh wrappers for getting XML to
simplify code
virsh-domain: Use the virsh wrappers for getting XML to simplify code
virsh-domain: Refactor cmdTTYConsole
cfg.mk | 8 +
po/POTFILES.in | 1 +
tools/Makefile.am | 1 +
tools/virsh-domain-monitor.c | 89 +++--------
tools/virsh-domain.c | 370 ++++++++++++++-----------------------------
tools/virsh-domain.h | 12 --
tools/virsh-host.c | 1 -
tools/virsh-snapshot.c | 74 ++++-----
tools/virsh-util.c | 222 ++++++++++++++++++++++++++
tools/virsh-util.h | 78 +++++++++
tools/virsh-volume.c | 1 +
tools/virsh.c | 41 -----
tools/virsh.h | 4 -
tools/vsh.c | 15 ++
tools/vsh.h | 1 +
15 files changed, 493 insertions(+), 425 deletions(-)
create mode 100644 tools/virsh-util.c
create mode 100644 tools/virsh-util.h
--
2.12.2