mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
node_device: udev: Use base 16 for product/vendor
udev doesn't prefix USB product/vendor info with '0x', so the strtol conversions were wrong for the product field (vendor already set the correct base). Make the change for PCI product/vendor as well to be safe. This fixes USB device assignment via virt-manager.
This commit is contained in:
parent
2861390866
commit
3238081efd
@ -457,14 +457,14 @@ static int udevProcessPCI(struct udev_device *device,
|
|||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"vendor",
|
"vendor",
|
||||||
&data->pci_dev.vendor,
|
&data->pci_dev.vendor,
|
||||||
0) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udevGetUintSysfsAttr(device,
|
if (udevGetUintSysfsAttr(device,
|
||||||
"device",
|
"device",
|
||||||
&data->pci_dev.product,
|
&data->pci_dev.product,
|
||||||
0) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ static int udevProcessUSBDevice(struct udev_device *device,
|
|||||||
if (udevGetUintProperty(device,
|
if (udevGetUintProperty(device,
|
||||||
"ID_MODEL_ID",
|
"ID_MODEL_ID",
|
||||||
&data->usb_dev.product,
|
&data->usb_dev.product,
|
||||||
0) == PROPERTY_ERROR) {
|
16) == PROPERTY_ERROR) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user