mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
scd: Let the CCID module auto detach the kernel driver.
* scd/ccid-driver.c (ccid_open_usb_reader): Call libusb_set_auto_detach_kernel_driver. * scd/scdaemon.c (oCompatibilityFlags): New. (opts): Add option "compatibility-flags". (compatibility_flags): New. (main): Parse flags. * scd/scdaemon.h (opt): Add field compat_flags. (COMPAT_CCID_NO_AUTO_DETACH): New.
This commit is contained in:
parent
00b877ecda
commit
a1ea3b13e0
3 changed files with 41 additions and 0 deletions
|
@ -1779,6 +1779,20 @@ ccid_open_usb_reader (const char *spec_reader_name,
|
|||
#ifdef USE_NPTH
|
||||
npth_unprotect ();
|
||||
#endif
|
||||
if (!(opt.compat_flags & COMPAT_CCID_NO_AUTO_DETACH))
|
||||
{
|
||||
rc = libusb_set_auto_detach_kernel_driver (idev, 1);
|
||||
if (rc)
|
||||
{
|
||||
#ifdef USE_NPTH
|
||||
npth_protect ();
|
||||
#endif
|
||||
DEBUGOUT_1 ("note: set_auto_detach_kernel_driver failed: %d\n", rc);
|
||||
#ifdef USE_NPTH
|
||||
npth_unprotect ();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rc = libusb_claim_interface (idev, ifc_no);
|
||||
if (rc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue