2013/3/21 Pete Batard <p...@akeo.ie>:
> Do you, or anyone, have a preference for how this new cap should be
> called? I don't think LIBUSBX_HAS_DETACH will fly, as we could argue
> that Windows also has _detach - it just returns an error when called.

Maybe LIBUSBX_IMPLEMENTS_DETACH_KERNEL_DRIVER

> Right now, I'm leaning towards LIBUSBX_MAY_REQUIRE_DETACH or
> LIBUSBX_DEVICE_MAY_NEED_DETACH, but I wouldn't mind hearing other opinions.

I propose to replace DETACH by a more explicit DETACH_KERNEL_DRIVER
Note that the libusb(x) function is libusb_detach_kernel_driver() not
libusb_detach(). It is better if the names can match.


It would also be cool if libusb_claim_interface() could report a
specific error in case detach is needed.
Something like LIBUSB_ERROR_NEED_DETACH_KERNEL_DRIVER.

I do not like the code of the example [1] that calls
libusb_detach_kernel_driver() for _any_ error code returned by
libusb_claim_interface()
But maybe that is not possibe to return such a specific error code.

Bye

[1] https://github.com/libusbx/libusbx/blob/master/examples/xusb.c#L836

-- 
 Dr. Ludovic Rousseau

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to