mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
Fix USB device re-labelling
A simple misplaced break out of a switch results in: libvir: error : Failed to open file '/sys/bus/pci/devices/0000:00:54c./vendor': No such file or directory libvir: error : Failed to open file '/sys/bus/pci/devices/0000:00:54c./device': No such file or directory libvir: error : this function is not supported by the hypervisor: Failed to read product/vendor ID for 0000:00:54c. when trying to passthrough a USB host device to qemu. * src/security_selinux.c: fix a switch/break thinko
This commit is contained in:
parent
79d233b5ca
commit
1daea0c59d
@ -492,12 +492,11 @@ SELinuxSetSecurityHostdevLabel(virConnectPtr conn,
|
||||
|
||||
ret = usbDeviceFileIterate(conn, usb, SELinuxSetSecurityUSBLabel, vm);
|
||||
usbFreeDevice(conn, usb);
|
||||
|
||||
break;
|
||||
} else {
|
||||
/* XXX deal with product/vendor better */
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: {
|
||||
|
Loading…
Reference in New Issue
Block a user