Re: [PATCH v2 2/3] qemu: make use of usb search function to initialize usb devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/01/2012 02:16 AM, Guannan Ren wrote:
> refactor qemuPrepareHostdevUSBDevices function, make it focus on
> adding usb device to activeUsbHostdevs after check. After that,
> the usb hotplug function qemuDomainAttachHostDevice also could use
> it.
> 
> expand qemuPrepareHostUSBDevices to perform the usb search,
> rollback on failure.
> ---

>  
> +        if (vendor && bus) {
> +            usb = usbFindDevice(vendor, product, bus, device);

Can bus be 0, or does the USB bus numbering start with 1?  If 0 is a
valid bus number, then you need to know whether bus was specified, not
whether it is non-zero.

> +        } else if (vendor && !bus) {
> +            usbDeviceList *devs = usbFindDevByVendor(vendor, product);
> +            if (!devs)
> +                goto cleanup;
> +
> +            if (usbDeviceListCount(devs) > 1) {
> +                qemuReportError(VIR_ERR_XML_ERROR,
> +                                _("multiple USB deivces %x:%x, "

s/deivces/devices/

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]