Re: [PATCH virt-viewer 4/4] virt-viewer-main: '--wait' should not be used without domain name

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

 



On Tue, 2015-04-14 at 17:45 +0200, Pavel Grunt wrote:
> Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
> name to be placed just after the '--wait' option. It breaked the
> command line api, because running 'virt-viewer $vm --wait' was considered
> as the error.
> 
> This patch rather checks whether the domain name was specified.
> 
> Related: rhbz#1209398, rhbz#1211573
> ---
>  src/virt-viewer-main.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
> index af1251e..505b472 100644
> --- a/src/virt-viewer-main.c
> +++ b/src/virt-viewer-main.c
> @@ -108,6 +108,11 @@ int main(int argc, char **argv)
>          goto cleanup;
>      }
>  
> +    if (args == NULL && waitvm) {
> +        g_printerr(_("\nNo DOMAIN-NAME|ID|UUID was specified for '--wait'\n\n"));
> +        goto cleanup;
> +    }
> +
>      viewer = virt_viewer_new(uri, (args) ? args[0] : NULL, direct, attach, waitvm, reconnect);
>      if (viewer == NULL)
>          goto cleanup;

Yeah, I think this is a better approach. ACK series. Thanks!

Jonathon

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux