]> xenbits.xensource.com Git - libvirt.git/commitdiff
virt-admin: Output srv-threadpool-info data as unsigned int rather than signed
authorErik Skultety <eskultet@redhat.com>
Mon, 18 Jul 2016 08:45:17 +0000 (10:45 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 19 Jul 2016 11:27:45 +0000 (13:27 +0200)
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@redhat.com>
tools/virt-admin.c

index c4ee8f5b13f3fbb75954f9aa21e5bc4f79b23df7..a59c4c7226771993d6003a871766bb5b0e0e2138 100644 (file)
@@ -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;