darwin: improve support for auto-detaching a kernel driver
authorNathan Hjelm <hjelmn@google.com>
Fri, 9 Jul 2021 15:17:33 +0000 (09:17 -0600)
committerNathan Hjelm <hjelmn@google.com>
Fri, 9 Jul 2021 15:17:33 +0000 (09:17 -0600)
commit339d24c8235476ceee43f7d704415ccab85e2583
tree2e95488fc760bba7e8a2cc84989d90686406c687
parentced455398619b480e511d93f6c9664ae99978557
darwin: improve support for auto-detaching a kernel driver

This commit improves the code around auto attach/detach of a kernel driver:

 - Log a warning when a driver can not be auto-detached and continue when claiming an
   interface. It could be the case that the interface has no driver attached or that
   the claim will still succeed.

 - Log a warning if the driver can not be auto-attached and return success when
   releasing an interface. The operation did complete successfully but the
   re-enumeration may have failed. This can be discovered on the next device
   access.

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb/os/darwin_usb.c
libusb/version_nano.h