[libvirt] [PATCH] virt-admin: Output srv-threadpool-info data as unsigned int rather than signed

Martin Kletzander mkletzan at redhat.com
Tue Jul 19 09:35:15 UTC 2016


On Mon, Jul 18, 2016 at 12:54:06PM +0200, Erik Skultety wrote:
>Internally, all the data are represented as unsigned int, it is also documented
>in the header file that users should use our exported constants that also
>indicate that the data should be unsigned int. However, when polling for the
>current server threadpool's configuration, virt-admin uses an incorrect
>formatting parameter '%d' for printf. Instead, virt-admin should use formatting
>parameter '%u'.
>
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356769
>
>Signed-off-by: Erik Skultety <eskultet at redhat.com>
>---
> tools/virt-admin.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

ACK, trivial

>diff --git a/tools/virt-admin.c b/tools/virt-admin.c
>index c4ee8f5..a59c4c7 100644
>--- a/tools/virt-admin.c
>+++ b/tools/virt-admin.c
>@@ -458,7 +458,7 @@ cmdSrvThreadpoolInfo(vshControl *ctl, const vshCmd *cmd)
>     }
>
>     for (i = 0; i < nparams; i++)
>-        vshPrint(ctl, "%-15s: %d\n", params[i].field, params[i].value.ui);
>+        vshPrint(ctl, "%-15s: %u\n", params[i].field, params[i].value.ui);
>
>     ret = true;
>
>--
>2.5.5
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160719/999aebf7/attachment-0001.sig>


More information about the libvir-list mailing list