[PATCH] usb: don't spoil decadic addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For USB devices, dev->name gets formated as %.3o:%.3o even though the
numbers are decadic.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=967712

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---

Notes:
    It can be seen few lines down the file

 src/util/virusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virusb.c b/src/util/virusb.c
index 27ba9c7..d34e44f 100644
--- a/src/util/virusb.c
+++ b/src/util/virusb.c
@@ -342,10 +342,10 @@ virUSBDeviceNew(unsigned int bus,
     dev->bus     = bus;
     dev->dev     = devno;

-    if (snprintf(dev->name, sizeof(dev->name), "%.3o:%.3o",
+    if (snprintf(dev->name, sizeof(dev->name), "%.3d:%.3d",
                  dev->bus, dev->dev) >= sizeof(dev->name)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("dev->name buffer overflow: %.3o:%.3o"),
+                       _("dev->name buffer overflow: %.3d:%.3d"),
                        dev->bus, dev->dev);
         virUSBDeviceFree(dev);
         return NULL;
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]