Re: [PATCH] virsh: re-fix help printing without connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 21, 2016 at 11:29:47AM +0300, Roman Bogorodskiy wrote:
> Re-do 0217089 so it does not add regression for commit c0726e0 that allowed to
> print help without making a connection to the daemon.
> ---
>  tools/virsh.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

ACK

Jan

> diff --git a/tools/virsh.c b/tools/virsh.c
> index e14410b..366956c 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -962,14 +962,16 @@ main(int argc, char **argv)
>      if (!vshInit(ctl, cmdGroups, NULL))
>          exit(EXIT_FAILURE);
>  
> -    ctl->connname = vshStrdup(ctl, virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
> -
>      if (!virshParseArgv(ctl, argc, argv) ||
>          !virshInit(ctl)) {
>          virshDeinit(ctl);
>          exit(EXIT_FAILURE);
>      }
>  
> +    if (!ctl->connname)
> +        ctl->connname = vshStrdup(ctl,
> +                                  virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
> +
>      if (!ctl->imode) {
>          ret = vshCommandRun(ctl, ctl->cmd);
>      } else {
> -- 
> 2.7.4
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]