From: Mark McLoughlin Date: Wed, 30 Sep 2009 17:37:03 +0000 (+0100) Subject: Fix USB device re-labelling X-Git-Tag: v0.7.2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1daea0c59d50c9e8b2b7d5052da115e1fb7be2f2;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index bdd9eb2a93..d08d502faa 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -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: {