FreeCalypso > hg > fc-pcsc-tools
comparison uicc/main.c @ 28:78f93e3c9ebf
fc-simtool & fc-uicc-tool: show card reader name and
ATR only in interactive mode
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 Feb 2021 16:14:53 +0000 |
parents | 1b1468869ccf |
children | 84d1c31d0fad |
comparison
equal
deleted
inserted
replaced
27:be946be3f9a7 | 28:78f93e3c9ebf |
---|---|
11 char command[512]; | 11 char command[512]; |
12 int rc; | 12 int rc; |
13 | 13 |
14 setup_pcsc_context(); | 14 setup_pcsc_context(); |
15 get_reader_name(); | 15 get_reader_name(); |
16 printf("Card reader name: %s\n", reader_name_buf); | 16 if (argc < 2) |
17 printf("Card reader name: %s\n", reader_name_buf); | |
17 connect_to_card(); | 18 connect_to_card(); |
18 retrieve_atr(); | |
19 if (argc >= 2) { | 19 if (argc >= 2) { |
20 rc = dispatch_ready_argv(argc - 1, argv + 1); | 20 rc = dispatch_ready_argv(argc - 1, argv + 1); |
21 if (rc) | 21 if (rc) |
22 error_exit(); | 22 error_exit(); |
23 else | 23 else |
24 good_exit(); | 24 good_exit(); |
25 } | 25 } |
26 retrieve_atr(); | |
26 for (;;) { | 27 for (;;) { |
27 if (isatty(0)) { | 28 if (isatty(0)) { |
28 fputs("uicc> ", stdout); | 29 fputs("uicc> ", stdout); |
29 fflush(stdout); | 30 fflush(stdout); |
30 } | 31 } |