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

Re: [libvirt] [PATCH] show compiled in options in virsh --version



On Thu, Oct 28, 2010 at 11:21:16AM -0600, Eric Blake wrote:
> On 10/28/2010 07:00 AM, Daniel Veillard wrote:
[...]
> > +    vshPrint(ctl, _(" Hypervisors: "));
> > +#ifdef WITH_XEN
> > +    vshPrint(ctl, "Xen ");
> > +#endif
> ...
> > +    vshPrint(ctl, "\n");
> 
> Rather than printing a trailing space, why not:
> 
>     vshPrint(ctl, _(" Hypervisors:"));
> #ifdef WITH_XEN
>     vshPrint(ctl, " Xen");
> #endif
> ...
>     vshPrint(ctl, "\n");

  yeah, at some point I ended up with an extra space at the end of lines
and though 'hum that could be improved', sure that's the best way :-)

> > @@ -11521,8 +11644,7 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
> >              ctl->name = vshStrdup(ctl, optarg);
> >              break;
> >          case 'v':
> > -            /* FIXME - list a copyright blurb, as in GNU programs?  */
> > -            puts(VERSION);
> > +            vshShowVersion(ctl);
> >              exit(EXIT_SUCCESS);
> 
> Pre-existing bug - we don't detect write failure to stdout to exit with
> non-zero status.  Unchanged by your patch.

  Not sure it's really a problem, but okay I will look.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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