FreeCalypso > hg > fc-pcsc-tools
comparison simtool/lndwrite.c @ 84:51f26fd967e2
lnd-erase command implemented
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Wed, 17 Feb 2021 06:15:15 +0000 |
| parents | 07e395fddfe1 |
| children |
comparison
equal
deleted
inserted
replaced
| 83:07e395fddfe1 | 84:51f26fd967e2 |
|---|---|
| 29 if (rc < 0) | 29 if (rc < 0) |
| 30 return(rc); | 30 return(rc); |
| 31 } | 31 } |
| 32 return update_rec_op(0, 0x03, record, curfile_record_len); | 32 return update_rec_op(0, 0x03, record, curfile_record_len); |
| 33 } | 33 } |
| 34 | |
| 35 cmd_lnd_erase(argc, argv) | |
| 36 char **argv; | |
| 37 { | |
| 38 int rc; | |
| 39 u_char record[255]; | |
| 40 unsigned count; | |
| 41 | |
| 42 rc = select_ef_lnd(); | |
| 43 if (rc < 0) | |
| 44 return(rc); | |
| 45 memset(record, 0xFF, curfile_record_len); | |
| 46 for (count = 0; count < curfile_record_count; count++) { | |
| 47 rc = update_rec_op(0, 0x03, record, curfile_record_len); | |
| 48 if (rc < 0) | |
| 49 return(rc); | |
| 50 } | |
| 51 return(0); | |
| 52 } |
