FreeCalypso > hg > fc-pcsc-tools
changeset 37:acf343dace04
-p reader selection implemented in fc-uicc-tool
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 Feb 2021 17:50:42 +0000 |
parents | 04e7e3008097 |
children | f5a26c1d0b93 |
files | uicc/main.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/uicc/main.c Fri Feb 12 17:44:07 2021 +0000 +++ b/uicc/main.c Fri Feb 12 17:50:42 2021 +0000 @@ -8,17 +8,19 @@ main(argc, argv) char **argv; { + extern int optind; char command[512]; int rc; + parse_global_options(argc, argv); setup_pcsc_context(); get_reader_list(); select_reader_by_num(); - if (argc < 2) + if (argc <= optind) printf("Card reader name: %s\n", selected_reader); connect_to_card(); - if (argc >= 2) { - rc = dispatch_ready_argv(argc - 1, argv + 1); + if (argc > optind) { + rc = dispatch_ready_argv(argc - optind, argv + optind); if (rc) error_exit(); else