summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-06-13 21:49:01 +0200
committerHans de Goede <hdegoede@redhat.com>2013-06-19 11:04:15 +0200
commitd4e993192aa81a1867bddf90d53cf750ec21e7b1 (patch)
tree1ba35c380272b8f492629c2a9614a602573018b9 /examples
parentfc51f19341af70508b94c06ff763842b396ea72e (diff)
downloadlibusb-d4e993192aa81a1867bddf90d53cf750ec21e7b1.tar.gz
linux_usbfs: Add support for new disconnect-and-claim ioctl
Currently the linux_usbfs detach_kernel_driver_and_claim() helper function makes 3 system calls: 1) IOCTL_USBFS_GETDRIVER, to check the driver is not usbfs 2) IOCTL_USBFS_DISCONNECT 3) IOCTL_USBFS_CLAIMINTF Between each of these calls the state of the interface can change, and things might not work as expected when it does, iow this is inherently racy. To fix this a new IOCTL_USBFS_DISCONNECT_CLAIM ioctl has been added to the kernel a while back, which does all 3 in one. This patch adds support for this ioctl, with a fall back to the old method for kernels lacking this new ioctl. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions