FreeCalypso > hg > fc-pcsc-tools
comparison simtool/smsp_common.c @ 38:f5a26c1d0b93
fc-simtool smsp-dump implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 Feb 2021 20:39:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
37:acf343dace04 | 38:f5a26c1d0b93 |
---|---|
1 /* | |
2 * This module implements some common functions for working with EF_SMSP. | |
3 */ | |
4 | |
5 #include <stdio.h> | |
6 #include "curfile.h" | |
7 #include "file_id.h" | |
8 | |
9 select_ef_smsp() | |
10 { | |
11 int rc; | |
12 | |
13 rc = select_op(DF_TELECOM); | |
14 if (rc < 0) | |
15 return(rc); | |
16 rc = select_op(EF_SMSP); | |
17 if (rc < 0) | |
18 return(rc); | |
19 rc = parse_ef_select_response(); | |
20 if (rc < 0) | |
21 return(rc); | |
22 if (curfile_structure != 0x01) { | |
23 fprintf(stderr, "error: EF_SMSP is not linear fixed\n"); | |
24 return(-1); | |
25 } | |
26 if (curfile_record_len < 28) { | |
27 fprintf(stderr, | |
28 "error: EF_SMSP has record length of %u bytes, less than minimum 28\n", | |
29 curfile_record_len); | |
30 return(-1); | |
31 } | |
32 return(0); | |
33 } |