]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Report error when explicit connection fails
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 29 Jul 2016 06:09:22 +0000 (08:09 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 2 Aug 2016 11:21:01 +0000 (13:21 +0200)
commitff498a9ac70a550bed08233a86e00a4faf12aecf
tree5838e3276bcbcd38e3af47ceac5ef64affbbfda1
parenta2b97a8d912a37ba1935bf98be4c332f42332236
virsh: Report error when explicit connection fails

Commit 0c56d9431839 forgot to return false in the cmdConnect command
after the clean up made there.

Before (assuming you don't have uri alias for 'asdf'):
  $ virsh connect asdf
  error: failed to connect to the hypervisor

  $ echo $?
  0

After (with the same assumption):
  $ virsh connect asdf
  error: failed to connect to the hypervisor
  error: no connection driver available for asdf

  $ echo $?
  1

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356461

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tools/virsh.c