FreeCalypso > hg > fc-pcsc-tools
diff simtool/readef.c @ 172:e7e0d8c06654
fc-simtool: support output redirection in select command
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 02 Mar 2021 03:18:21 +0000 |
parents | 4d747b86da00 |
children | e70964adcbba |
line wrap: on
line diff
--- a/simtool/readef.c Tue Mar 02 03:03:49 2021 +0000 +++ b/simtool/readef.c Tue Mar 02 03:18:21 2021 +0000 @@ -38,15 +38,13 @@ "error: readef command is only for transparent EFs\n"); return(-1); } - if (outf == stdout) { - printf("Transparent EF of %u byte(s)\n", curfile_total_size); - printf("File status: %02X\n", sim_resp_data[11]); - show_access_conditions("UPDATE", sim_resp_data[8] & 0xF); - show_access_conditions("READ & SEEK", sim_resp_data[8] >> 4); - show_access_conditions("INCREASE", sim_resp_data[9] >> 4); - show_access_conditions("INVALIDATE", sim_resp_data[10] & 0xF); - show_access_conditions("REHABILITATE", sim_resp_data[10] >> 4); - } + fprintf(outf, "Transparent EF of %u byte(s)\n", curfile_total_size); + fprintf(outf, "File status: %02X\n", sim_resp_data[11]); + show_access_conditions(outf, "UPDATE", sim_resp_data[8] & 0xF); + show_access_conditions(outf, "READ & SEEK", sim_resp_data[8] >> 4); + show_access_conditions(outf, "INCREASE", sim_resp_data[9] >> 4); + show_access_conditions(outf, "INVALIDATE", sim_resp_data[10] & 0xF); + show_access_conditions(outf, "REHABILITATE", sim_resp_data[10] >> 4); if (!curfile_total_size) return(0); readlen = curfile_total_size;