1 Oct 2009 12:40
Re: [libvirt] [PATCH] Fix USB device re-labelling
Chris Lalancette <clalance <at> redhat.com>
2009-10-01 10:40:37 GMT
2009-10-01 10:40:37 GMT
Mark McLoughlin wrote:
> 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
> ---
> src/security/security_selinux.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
> index bdd9eb2..d08d502 100644
> --- a/src/security/security_selinux.c
> +++ b/src/security/security_selinux.c
> <at> <at> -492,12 +492,11 <at> <at> SELinuxSetSecurityHostdevLabel(virConnectPtr conn,
>
> ret = usbDeviceFileIterate(conn, usb, SELinuxSetSecurityUSBLabel, vm);
> usbFreeDevice(conn, usb);
> -
> - break;
> } else {
> /* XXX deal with product/vendor better */
> ret = 0;
> }
> + break;
(Continue reading)
RSS Feed