mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 16:15:19 +00:00
The base used for conversion of USB values should be 16 not 10.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
parent
b69bbebbba
commit
75d88455f5
@ -548,8 +548,6 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* XXX Is 10 the correct base for the Number/Class/SubClass/Protocol
|
|
||||||
* conversions? */
|
|
||||||
static int udevProcessUSBInterface(struct udev_device *device,
|
static int udevProcessUSBInterface(struct udev_device *device,
|
||||||
virNodeDeviceDefPtr def)
|
virNodeDeviceDefPtr def)
|
||||||
{
|
{
|
||||||
@ -559,28 +557,28 @@ static int udevProcessUSBInterface(struct udev_device *device,
|
|||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"bInterfaceNumber",
|
"bInterfaceNumber",
|
||||||
&data->usb_if.number,
|
&data->usb_if.number,
|
||||||
10) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"bInterfaceClass",
|
"bInterfaceClass",
|
||||||
&data->usb_if._class,
|
&data->usb_if._class,
|
||||||
10) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"bInterfaceSubClass",
|
"bInterfaceSubClass",
|
||||||
&data->usb_if.subclass,
|
&data->usb_if.subclass,
|
||||||
10) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"bInterfaceProtocol",
|
"bInterfaceProtocol",
|
||||||
&data->usb_if.protocol,
|
&data->usb_if.protocol,
|
||||||
10) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user