[Spice-devel] [usbredir PATCH 5/6] usbredirhost: claim/release: ignore NOT_SUPPORTED on attach|detach kernel driver
xiaofanc at gmail.com
Fri May 4 01:25:52 PDT 2012
On Fri, May 4, 2012 at 3:09 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi Xiaofan,
> I did not know you where following this list too :)
>> To me the above is not the right fix, the right fix is to limit the call
>> libusb_detach_kernel_driver() to Linux only. Do not use this
>> call for other systems since all the other OS does not support this
>> call -- be it Mac OS X, Windows, or BSDs.
> I agree that an #ifdef __linux__ would be a good fix too. Note that the
> NOT_SUPPORTED check will work as well, but you're right that we
> might just as well #ifdef out the code.
Thanks. Yes the fix Uri proposed will also work.
On the other hand, at least for the codes using libusb-0.1, ifdef is
the norm since libusb-win32 does not have the driver detach function
at all. In the cases of libusb-1.0/libusbx, then the function is there
for platforms other than Linux but it return unsupported error.
More information about the Spice-devel