comparison misc/fc-pcsc-atr.c @ 30:84d1c31d0fad

first round of refactoring for selection among multiple readers
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Feb 2021 17:09:01 +0000
parents 4bd6275d7c79
children 8a4f3d00d997
comparison
equal deleted inserted replaced
29:d368051576d0 30:84d1c31d0fad
8 char **argv; 8 char **argv;
9 { 9 {
10 int rc; 10 int rc;
11 11
12 setup_pcsc_context(); 12 setup_pcsc_context();
13 get_reader_name(); 13 get_reader_list();
14 printf("Card reader name: %s\n", reader_name_buf); 14 select_reader_num(0);
15 printf("Card reader name: %s\n", selected_reader);
15 connect_to_card(); 16 connect_to_card();
16 rc = retrieve_atr(); 17 rc = retrieve_atr();
17 if (rc) 18 if (rc)
18 error_exit(); 19 error_exit();
19 else 20 else