[libvirt] [Klaus@xxxxxxxxx: [Pkg-libvirt-maintainers] Bug#579208: USB Class/Number/... is base 16, not base 10 (Failed to convert 'ff' to unsigned int)]

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

 



Hi,
this patch from Klau Ethgen looks right to me. O.k. to apply? I'll
remove the comment with this patch then.
Cheers,
 -- Guido

----- Forwarded message from Klaus Ethgen <Klaus@xxxxxxxxx> -----

in node_device_udev.c is the base 10 used for conversion of USB values.
But they are hex values so that the conversion fail in the most of time.

Funny is that the upstream did know that but didn't fix it (comment in
line 551).

The patch will fix that. But it do not remove the comment.

--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -559,28 +559,28 @@ static int udevProcessUSBInterface(struc
     if (udevGetUintSysfsAttr(device,
                              "bInterfaceNumber",
                              &data->usb_if.number,
-                             10) == PROPERTY_ERROR) {
+                             16) == PROPERTY_ERROR) {
         goto out;
     }
 
     if (udevGetUintSysfsAttr(device,
                              "bInterfaceClass",
                              &data->usb_if._class,
-                             10) == PROPERTY_ERROR) {
+                             16) == PROPERTY_ERROR) {
         goto out;
     }
 
     if (udevGetUintSysfsAttr(device,
                              "bInterfaceSubClass",
                              &data->usb_if.subclass,
-                             10) == PROPERTY_ERROR) {
+                             16) == PROPERTY_ERROR) {
         goto out;
     }
 
     if (udevGetUintSysfsAttr(device,
                              "bInterfaceProtocol",
                              &data->usb_if.protocol,
-                             10) == PROPERTY_ERROR) {
+                             16) == PROPERTY_ERROR) {
         goto out;
     }
 


--
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]