aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2011-09-13 17:16:45 +0200
committerEric Blake <eblake@redhat.com>2011-09-13 16:55:04 -0600
commit799912fa05b8c3aa37bd04c57b196755f3f70552 (patch)
tree9280a125c3a92d4b7ccb434070ea3e7de131bc0b /tools
parentsnapshot: fix double free of qemuImgBinary (diff)
downloadlibvirt-799912fa05b8c3aa37bd04c57b196755f3f70552.tar.gz
libvirt-799912fa05b8c3aa37bd04c57b196755f3f70552.tar.bz2
libvirt-799912fa05b8c3aa37bd04c57b196755f3f70552.zip
virsh: Use old API if remote libvirtd does not support new
Commit ffe28ab74b821c916ec4ba8efb5c992454e4bd24 introduced regression while communicating with older libvirtd command 'domblkstat' used the new API and did not check for VIR_ERR_RPC error code signalling the remote server does not support this API and did not fall back to older API. Thereafter 'domblkstat' ended with "error: unknown procedure: 243".
Diffstat (limited to 'tools')
-rw-r--r--tools/virsh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/virsh.c b/tools/virsh.c
index 3b060bfdc..430168c02 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1090,7 +1090,8 @@ cmdDomblkstat (vshControl *ctl, const vshCmd *cmd)
* then.
*/
if (rc < 0) {
- if (last_error->code != VIR_ERR_NO_SUPPORT) {
+ if (last_error->code != VIR_ERR_NO_SUPPORT &&
+ last_error->code != VIR_ERR_RPC) {
virshReportError(ctl);
goto cleanup;
} else {