diff options
| author | Werner Koch <[email protected]> | 2024-03-06 10:54:33 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2024-03-07 12:21:43 +0000 |
| commit | a1ea3b13e0c79cb301216727b17631fbf1b23e06 (patch) | |
| tree | 1203512c1a0be060dcc5f573480892f6e4eda766 /scd/scdaemon.c | |
| parent | doc: Typo fix in comment (diff) | |
| download | gnupg-a1ea3b13e0c79cb301216727b17631fbf1b23e06.tar.gz gnupg-a1ea3b13e0c79cb301216727b17631fbf1b23e06.zip | |
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.
Diffstat (limited to 'scd/scdaemon.c')
| -rw-r--r-- | scd/scdaemon.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scd/scdaemon.c b/scd/scdaemon.c index ed7fdc03a..1a8705b18 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -104,6 +104,7 @@ enum cmd_and_opt_values oDisableApplication, oApplicationPriority, oEnablePinpadVarlen, + oCompatibilityFlags, oListenBacklog }; @@ -172,6 +173,7 @@ static gpgrt_opt_t opts[] = { ARGPARSE_s_s (oDisableApplication, "disable-application", "@"), ARGPARSE_s_s (oApplicationPriority, "application-priority", N_("|LIST|change the application priority to LIST")), + ARGPARSE_s_s (oCompatibilityFlags, "compatibility-flags", "@"), ARGPARSE_s_i (oListenBacklog, "listen-backlog", "@"), @@ -204,6 +206,14 @@ static struct debug_flags_s debug_flags [] = }; +/* The list of compatibility flags. */ +static struct compatibility_flags_s compatibility_flags [] = + { + { COMPAT_CCID_NO_AUTO_DETACH, "ccid-no-auto-detach" }, + { 0, NULL } + }; + + /* The card driver we use by default for PC/SC. */ #if defined(HAVE_W32_SYSTEM) || defined(__CYGWIN__) #define DEFAULT_PCSC_DRIVER "winscard.dll" @@ -632,6 +642,15 @@ main (int argc, char **argv ) case oEnablePinpadVarlen: opt.enable_pinpad_varlen = 1; break; + case oCompatibilityFlags: + if (parse_compatibility_flags (pargs.r.ret_str, &opt.compat_flags, + compatibility_flags)) + { + pargs.r_opt = ARGPARSE_INVALID_ARG; + pargs.err = ARGPARSE_PRINT_WARNING; + } + break; + case oListenBacklog: listen_backlog = pargs.r.ret_int; break; |
