[virt-tools-list] [PATCH virt-viewer 3/3] virt-viewer-main: exit when domain names doesn't match

Pavel Grunt pgrunt at redhat.com
Tue Apr 14 12:43:47 UTC 2015


> 
> On Tue, Apr 14, 2015 at 2:08 PM, Pavel Grunt <pgrunt at redhat.com>
> wrote:
> > Since the domain name is required as a parameter for the '--wait'
> > option (commit a830275344c88aef12166661b68ea2b4429c7212 ), it is
> > neccessary to check whether all domains names are the same.
> > Otherwise
> > it wouldn't be clear which name should be used.
> >
> > related: 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 8c1ca80..b2ae0be 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 && waitvm != NULL && g_strcmp0(waitvm, args[0])) {
> 
> This is a personal preference and you can ignore it if you prefer ...
> I'd use compare the g_strcmp0() result explicitly ... like
> g_strcmp0() != 0 ....
> 

Sure, going to send v2.

Thanks,

Pavel




More information about the virt-tools-list mailing list