FreeCalypso > hg > fc-pcsc-tools
changeset 102:9ce95d9c5c34
plmnsel-erase-all command implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 Feb 2021 23:25:47 +0000 |
parents | 63c76f9d678a |
children | 9b2cb2b9c910 |
files | simtool/dispatch.c simtool/plmnsel.c |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/simtool/dispatch.c Wed Feb 17 23:19:00 2021 +0000 +++ b/simtool/dispatch.c Wed Feb 17 23:25:47 2021 +0000 @@ -41,6 +41,7 @@ extern int cmd_pb_update_imm_hex(); extern int cmd_plmnsel_dump(); extern int cmd_plmnsel_erase(); +extern int cmd_plmnsel_erase_all(); extern int cmd_plmnsel_write(); extern int cmd_pnn_dump(); extern int cmd_readbin(); @@ -134,6 +135,7 @@ {"pb-update-imm-hex", 4, 4, cmd_pb_update_imm_hex}, {"plmnsel-dump", 0, 1, cmd_plmnsel_dump}, {"plmnsel-erase", 1, 2, cmd_plmnsel_erase}, + {"plmnsel-erase-all", 0, 0, cmd_plmnsel_erase_all}, {"plmnsel-write", 2, 2, cmd_plmnsel_write}, {"pnn-dump", 0, 0, cmd_pnn_dump}, {"quit", 0, 0, good_exit},
--- a/simtool/plmnsel.c Wed Feb 17 23:19:00 2021 +0000 +++ b/simtool/plmnsel.c Wed Feb 17 23:25:47 2021 +0000 @@ -167,3 +167,16 @@ } return(0); } + +cmd_plmnsel_erase_all(argc, argv) + char **argv; +{ + int rc; + u_char ffbuf[255]; + + rc = select_ef_plmnsel(); + if (rc < 0) + return(rc); + memset(ffbuf, 0xFF, curfile_total_size); + return update_bin_op(0, ffbuf, curfile_total_size); +}