[libvirt] [PATCH] virsh: Cleanup virsh -V output

Fixed up virsh -V output by removing invalid WITH_PROXY & WITH_ONE checks, adding Hyper-V check and fixing the DTrace check. Signed-off-by: Doug Goldstein <cardoe@cardoe.com> --- tools/virsh.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2b4cb2c..9fccd2d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -20636,8 +20636,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_PHYP vshPrint(ctl, " PHYP"); #endif -#ifdef WITH_ONE - vshPrint(ctl, " ONE"); +#ifdef WITH_HYPERV + vshPrint(ctl, " Hyper-V"); #endif #ifdef WITH_TEST vshPrint(ctl, " Test"); @@ -20648,9 +20648,6 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_REMOTE vshPrint(ctl, " Remote"); #endif -#ifdef WITH_PROXY - vshPrint(ctl, " Proxy"); -#endif #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif @@ -20711,7 +20708,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); #endif -#ifdef WITH_DTRACE +#ifdef WITH_DTRACE_PROBES vshPrint(ctl, " DTrace"); #endif #ifdef USE_READLINE -- 1.7.3.4

On 2012年06月27日 02:31, Doug Goldstein wrote:
Fixed up virsh -V output by removing invalid WITH_PROXY& WITH_ONE checks, adding Hyper-V check and fixing the DTrace check.
Signed-off-by: Doug Goldstein<cardoe@cardoe.com> --- tools/virsh.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index 2b4cb2c..9fccd2d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -20636,8 +20636,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_PHYP vshPrint(ctl, " PHYP"); #endif -#ifdef WITH_ONE - vshPrint(ctl, " ONE"); +#ifdef WITH_HYPERV + vshPrint(ctl, " Hyper-V"); #endif #ifdef WITH_TEST vshPrint(ctl, " Test"); @@ -20648,9 +20648,6 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_REMOTE vshPrint(ctl, " Remote"); #endif -#ifdef WITH_PROXY - vshPrint(ctl, " Proxy"); -#endif #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif @@ -20711,7 +20708,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); #endif -#ifdef WITH_DTRACE +#ifdef WITH_DTRACE_PROBES vshPrint(ctl, " DTrace"); #endif #ifdef USE_READLINE
Good fixes, but WITH_LIBXL is also missed, better to add it in together. Regards, Osier

From: Doug Goldstein <cardoe@cardoe.com> Fixed up virsh -V output by removing invalid WITH_PROXY & WITH_ONE checks, adding several missing checks, and fixing the DTrace check. Signed-off-by: Doug Goldstein <cardoe@cardoe.com> Signed-off-by: Eric Blake <eblake@redhat.com> --- v2: I matched the order in daemon/libvirtd.c and src/libvirt.c, in order to make sure I picked up all the conditionals. tools/virsh.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index a783f47..3e8e6d1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -20781,35 +20781,41 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) vshPrint(ctl, "%s", _("Compiled with support for:\n")); vshPrint(ctl, "%s", _(" Hypervisors:")); -#ifdef WITH_XEN - vshPrint(ctl, " Xen"); -#endif #ifdef WITH_QEMU vshPrint(ctl, " QEmu/KVM"); #endif +#ifdef WITH_LXC + vshPrint(ctl, " LXC"); +#endif #ifdef WITH_UML vshPrint(ctl, " UML"); #endif +#ifdef WITH_XEN + vshPrint(ctl, " Xen"); +#endif +#ifdef WITH_LIBXL + vshPrint(ctl, " LibXL"); +#endif #ifdef WITH_OPENVZ vshPrint(ctl, " OpenVZ"); #endif -#ifdef WITH_VBOX - vshPrint(ctl, " VirtualBox"); +#ifdef WITH_VMWARE + vshPrint(ctl, " VMWare"); #endif -#ifdef WITH_XENAPI - vshPrint(ctl, " XenAPI"); +#ifdef WITH_PHYP + vshPrint(ctl, " PHYP"); #endif -#ifdef WITH_LXC - vshPrint(ctl, " LXC"); +#ifdef WITH_VBOX + vshPrint(ctl, " VirtualBox"); #endif #ifdef WITH_ESX vshPrint(ctl, " ESX"); #endif -#ifdef WITH_PHYP - vshPrint(ctl, " PHYP"); +#ifdef WITH_HYPERV + vshPrint(ctl, " Hyper-V"); #endif -#ifdef WITH_ONE - vshPrint(ctl, " ONE"); +#ifdef WITH_XENAPI + vshPrint(ctl, " XenAPI"); #endif #ifdef WITH_TEST vshPrint(ctl, " Test"); @@ -20820,9 +20826,6 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_REMOTE vshPrint(ctl, " Remote"); #endif -#ifdef WITH_PROXY - vshPrint(ctl, " Proxy"); -#endif #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif @@ -20838,6 +20841,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_NWFILTER vshPrint(ctl, " Nwfilter"); #endif +#ifdef WITH_INTERFACE + vshPrint(ctl, " Interface"); +#endif #ifdef WITH_VIRTUALPORT vshPrint(ctl, " VirtualPort"); #endif @@ -20871,6 +20877,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) vshPrint(ctl, "\n"); vshPrint(ctl, "%s", _(" Miscellaneous:")); +#ifdef WITH_NODE_DEVICES + vshPrint(ctl, " Nodedev"); +#endif #ifdef WITH_SECDRIVER_APPARMOR vshPrint(ctl, " AppArmor"); #endif @@ -20883,7 +20892,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); #endif -#ifdef WITH_DTRACE +#ifdef WITH_DTRACE_PROBES vshPrint(ctl, " DTrace"); #endif #ifdef USE_READLINE -- 1.7.10.2

On Wed, Jun 27, 2012 at 10:37 PM, Eric Blake <eblake@redhat.com> wrote:
From: Doug Goldstein <cardoe@cardoe.com>
Fixed up virsh -V output by removing invalid WITH_PROXY & WITH_ONE checks, adding several missing checks, and fixing the DTrace check.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com> Signed-off-by: Eric Blake <eblake@redhat.com> ---
v2: I matched the order in daemon/libvirtd.c and src/libvirt.c, in order to make sure I picked up all the conditionals.
tools/virsh.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index a783f47..3e8e6d1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -20781,35 +20781,41 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
vshPrint(ctl, "%s", _("Compiled with support for:\n")); vshPrint(ctl, "%s", _(" Hypervisors:")); -#ifdef WITH_XEN - vshPrint(ctl, " Xen"); -#endif #ifdef WITH_QEMU vshPrint(ctl, " QEmu/KVM"); #endif +#ifdef WITH_LXC + vshPrint(ctl, " LXC"); +#endif #ifdef WITH_UML vshPrint(ctl, " UML"); #endif +#ifdef WITH_XEN + vshPrint(ctl, " Xen"); +#endif +#ifdef WITH_LIBXL + vshPrint(ctl, " LibXL"); +#endif #ifdef WITH_OPENVZ vshPrint(ctl, " OpenVZ"); #endif -#ifdef WITH_VBOX - vshPrint(ctl, " VirtualBox"); +#ifdef WITH_VMWARE + vshPrint(ctl, " VMWare"); #endif -#ifdef WITH_XENAPI - vshPrint(ctl, " XenAPI"); +#ifdef WITH_PHYP + vshPrint(ctl, " PHYP"); #endif -#ifdef WITH_LXC - vshPrint(ctl, " LXC"); +#ifdef WITH_VBOX + vshPrint(ctl, " VirtualBox"); #endif #ifdef WITH_ESX vshPrint(ctl, " ESX"); #endif -#ifdef WITH_PHYP - vshPrint(ctl, " PHYP"); +#ifdef WITH_HYPERV + vshPrint(ctl, " Hyper-V"); #endif -#ifdef WITH_ONE - vshPrint(ctl, " ONE"); +#ifdef WITH_XENAPI + vshPrint(ctl, " XenAPI"); #endif #ifdef WITH_TEST vshPrint(ctl, " Test"); @@ -20820,9 +20826,6 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_REMOTE vshPrint(ctl, " Remote"); #endif -#ifdef WITH_PROXY - vshPrint(ctl, " Proxy"); -#endif #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif @@ -20838,6 +20841,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_NWFILTER vshPrint(ctl, " Nwfilter"); #endif +#ifdef WITH_INTERFACE + vshPrint(ctl, " Interface"); +#endif #ifdef WITH_VIRTUALPORT vshPrint(ctl, " VirtualPort"); #endif @@ -20871,6 +20877,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) vshPrint(ctl, "\n");
vshPrint(ctl, "%s", _(" Miscellaneous:")); +#ifdef WITH_NODE_DEVICES + vshPrint(ctl, " Nodedev"); +#endif #ifdef WITH_SECDRIVER_APPARMOR vshPrint(ctl, " AppArmor"); #endif @@ -20883,7 +20892,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); #endif -#ifdef WITH_DTRACE +#ifdef WITH_DTRACE_PROBES vshPrint(ctl, " DTrace"); #endif #ifdef USE_READLINE -- 1.7.10.2
ACK from me that this is a better patch as it catches more of the missing conditionals and drops the defunct ones. -- Doug Goldstein

On 2012年06月28日 11:37, Eric Blake wrote:
From: Doug Goldstein<cardoe@cardoe.com>
Fixed up virsh -V output by removing invalid WITH_PROXY& WITH_ONE checks, adding several missing checks, and fixing the DTrace check.
Signed-off-by: Doug Goldstein<cardoe@cardoe.com> Signed-off-by: Eric Blake<eblake@redhat.com> ---
v2: I matched the order in daemon/libvirtd.c and src/libvirt.c, in order to make sure I picked up all the conditionals.
tools/virsh.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index a783f47..3e8e6d1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -20781,35 +20781,41 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
vshPrint(ctl, "%s", _("Compiled with support for:\n")); vshPrint(ctl, "%s", _(" Hypervisors:")); -#ifdef WITH_XEN - vshPrint(ctl, " Xen"); -#endif #ifdef WITH_QEMU vshPrint(ctl, " QEmu/KVM"); #endif +#ifdef WITH_LXC + vshPrint(ctl, " LXC"); +#endif #ifdef WITH_UML vshPrint(ctl, " UML"); #endif +#ifdef WITH_XEN + vshPrint(ctl, " Xen"); +#endif +#ifdef WITH_LIBXL + vshPrint(ctl, " LibXL"); +#endif #ifdef WITH_OPENVZ vshPrint(ctl, " OpenVZ"); #endif -#ifdef WITH_VBOX - vshPrint(ctl, " VirtualBox"); +#ifdef WITH_VMWARE + vshPrint(ctl, " VMWare"); #endif -#ifdef WITH_XENAPI - vshPrint(ctl, " XenAPI"); +#ifdef WITH_PHYP + vshPrint(ctl, " PHYP"); #endif -#ifdef WITH_LXC - vshPrint(ctl, " LXC"); +#ifdef WITH_VBOX + vshPrint(ctl, " VirtualBox"); #endif #ifdef WITH_ESX vshPrint(ctl, " ESX"); #endif -#ifdef WITH_PHYP - vshPrint(ctl, " PHYP"); +#ifdef WITH_HYPERV + vshPrint(ctl, " Hyper-V"); #endif -#ifdef WITH_ONE - vshPrint(ctl, " ONE"); +#ifdef WITH_XENAPI + vshPrint(ctl, " XenAPI"); #endif #ifdef WITH_TEST vshPrint(ctl, " Test"); @@ -20820,9 +20826,6 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_REMOTE vshPrint(ctl, " Remote"); #endif -#ifdef WITH_PROXY - vshPrint(ctl, " Proxy"); -#endif #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif @@ -20838,6 +20841,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_NWFILTER vshPrint(ctl, " Nwfilter"); #endif +#ifdef WITH_INTERFACE + vshPrint(ctl, " Interface"); +#endif
$ grep WITH_INTERFACE * -r daemon/libvirtd.c:# ifdef WITH_INTERFACE tests/virdrivermoduletest.c:#ifdef WITH_INTERFACE WITH_INTERFACE is never defined, and I think it's mispelling of WITH_NETCF. So instead of add WITH_INTERFACE here, we need to fix the WITH_INTERFACE use in the two .c files. Or Change WITH_NETCF into WITH_INTERFACE overall. Personally I like the later more, as "interface" is the term we use across the project. Others look good. Osier

On 06/27/2012 09:52 PM, Osier Yang wrote:
On 2012年06月28日 11:37, Eric Blake wrote:
From: Doug Goldstein<cardoe@cardoe.com>
Fixed up virsh -V output by removing invalid WITH_PROXY& WITH_ONE checks, adding several missing checks, and fixing the DTrace check.
Signed-off-by: Doug Goldstein<cardoe@cardoe.com> Signed-off-by: Eric Blake<eblake@redhat.com> ---
@@ -20838,6 +20841,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_NWFILTER vshPrint(ctl, " Nwfilter"); #endif +#ifdef WITH_INTERFACE + vshPrint(ctl, " Interface"); +#endif
$ grep WITH_INTERFACE * -r daemon/libvirtd.c:# ifdef WITH_INTERFACE tests/virdrivermoduletest.c:#ifdef WITH_INTERFACE
WITH_INTERFACE is never defined, and I think it's mispelling of WITH_NETCF. So instead of add WITH_INTERFACE here, we need to fix the WITH_INTERFACE use in the two .c files. Or Change WITH_NETCF into WITH_INTERFACE overall. Personally I like the later more, as "interface" is the term we use across the project.
Oh my, I think you're right. I'll fix that in a followup patch, and have pushed this one using WITH_NETCF instead. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Doug Goldstein
-
Eric Blake
-
Osier Yang