On 10/28/2010 07:00 AM, Daniel Veillard wrote: > To ease debugging this trivial patch allows to find what was compiled > in in the local version of libvirt, this doesn't work for remote access > but that's probably sufficient. With the patch I get on my machine: > > paphio:~/libvirt/tools -> ./virsh --version > Virsh command line tool of libvirt 0.8.4 > See web site at http://libvirt.org/ > > Compiled with support for: > Hypervisors: Xen QEmu/KVM UML OpenVZ LXC ESX PHYP Test > Networking: Remote Daemon Network Bridging Netcf Nwfilter > Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM > Miscellaneous: SELinux Secrets Debug Readline > paphio:~/libvirt/tools -> > > instead of just "0.8.4"
> + 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");
> +
> + vshPrint(ctl, _(" Networking: "));
> +#ifdef WITH_REMOTE
> + vshPrint(ctl, "Remote ");
> +#endif
Likewise for each category.
> @@ -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.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
