comparison simtool/smsp_common.c @ 10:ddd767f6e15b

fc-simtool ported over
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 07:11:25 +0000
parents
children
comparison
equal deleted inserted replaced
9:c9ef9e91dd8e 10:ddd767f6e15b
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 }