[libvirt] [PATCH] storage: show compile options in virsh --version=long

Adding output to 'virsh --version=long' makes it easier to tell if a distro built with particular libraries (it doesn't tell you what a remote libvirtd is built with, but is still better than nothing). * tools/virsh.c (vshShowVersion): Add gluster witness. Signed-off-by: Eric Blake <eblake@redhat.com> --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virsh.c b/tools/virsh.c index 5559d71..9d07d3e 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3069,6 +3069,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_STORAGE_SHEEPDOG vshPrint(ctl, " Sheepdog"); #endif +#ifdef WITH_STORAGE_GLUSTER + vshPrint(ctl, " Gluster"); +#endif vshPrint(ctl, "\n"); vshPrint(ctl, "%s", _(" Miscellaneous:")); -- 1.8.4.2

On Wed, Dec 11, 2013 at 9:10 PM, Eric Blake <eblake@redhat.com> wrote:
Adding output to 'virsh --version=long' makes it easier to tell if a distro built with particular libraries (it doesn't tell you what a remote libvirtd is built with, but is still better than nothing).
* tools/virsh.c (vshShowVersion): Add gluster witness.
Signed-off-by: Eric Blake <eblake@redhat.com> --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/virsh.c b/tools/virsh.c index 5559d71..9d07d3e 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3069,6 +3069,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) #ifdef WITH_STORAGE_SHEEPDOG vshPrint(ctl, " Sheepdog"); #endif +#ifdef WITH_STORAGE_GLUSTER + vshPrint(ctl, " Gluster"); +#endif vshPrint(ctl, "\n");
vshPrint(ctl, "%s", _(" Miscellaneous:")); -- 1.8.4.2
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
From a code stand point this is fine. But the commit subject and message are ambiguous and don't really explain what you're doing. It seems like you're adding all storage compile options into the output when really they were there already and just Gluster was missing. Wouldn't be better to say "storage: show gluster option in virsh --version=long"?
I realize I'm nitpicking the commit message/subject, the code is fine so ACK from that stand point. -- Doug Goldstein

On 12/11/2013 08:38 PM, Doug Goldstein wrote:
On Wed, Dec 11, 2013 at 9:10 PM, Eric Blake <eblake@redhat.com> wrote:
Adding output to 'virsh --version=long' makes it easier to tell if a distro built with particular libraries (it doesn't tell you what a remote libvirtd is built with, but is still better than nothing).
From a code stand point this is fine. But the commit subject and message are ambiguous and don't really explain what you're doing. It seems like you're adding all storage compile options into the output when really they were there already and just Gluster was missing. Wouldn't be better to say "storage: show gluster option in virsh --version=long"?
Sure, that sounds nicer.
I realize I'm nitpicking the commit message/subject, the code is fine so ACK from that stand point.
Amended and pushed -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Doug Goldstein
-
Eric Blake