[libvirt] [PATCH] virsh: Report error when explicit connection fails

Ján Tomko jtomko at redhat.com
Mon Aug 1 07:07:17 UTC 2016


On Fri, Jul 29, 2016 at 08:17:42AM +0200, Martin Kletzander wrote:
>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 at redhat.com>
>---
> tools/virsh.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>

ACK

Jan




More information about the libvir-list mailing list