annotate simtool/fplmn.c @ 113:32acef9d20ff

fc-simtool plmnsel-dump: support output redirection
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 19 Feb 2021 07:17:59 +0000
parents 8a27f45bc1e6
children 3ddbc3fea5f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
2 * This module implements commands for working with EF_FPLMN.
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <sys/types.h>
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdio.h>
99
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
7 #include <stdlib.h>
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
8 #include <string.h>
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
9 #include <strings.h>
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "simresp.h"
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include "curfile.h"
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "file_id.h"
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 static
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
15 select_ef_fplmn()
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 {
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 int rc;
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 rc = select_op(DF_GSM);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 if (rc < 0)
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 return(rc);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
22 rc = select_op(EF_FPLMN);
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 if (rc < 0)
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 return(rc);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 rc = parse_ef_select_response();
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 if (rc < 0)
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 return(rc);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 if (curfile_structure != 0x00) {
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
29 fprintf(stderr, "error: EF_FPLMN is not transparent\n");
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 return(-1);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 }
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
32 if (curfile_total_size != 12) {
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 fprintf(stderr,
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
34 "error: EF_FPLMN size does not equal 12 bytes\n");
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 return(-1);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 }
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 return(0);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 }
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
40 cmd_fplmn_dump(argc, argv, outf)
101
63c76f9d678a plmnsel-dump can now write to file
Mychaela Falconia <falcon@freecalypso.org>
parents: 100
diff changeset
41 char **argv;
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
42 FILE *outf;
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 {
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
44 int rc;
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
45 u_char *dp;
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 char ascbuf[8];
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
47 unsigned idx;
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
49 rc = select_ef_fplmn();
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 if (rc < 0)
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 return(rc);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
52 rc = readbin_op(0, 12);
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
53 if (rc < 0)
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
54 return(rc);
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 dp = sim_resp_data;
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
56 for (idx = 0; idx < 4; idx++, dp += 3) {
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
57 if (idx)
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
58 putc(' ', outf);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
59 if (dp[0] == 0xFF && dp[1] == 0xFF && dp[2] == 0xFF)
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
60 fputs("-blank-", outf);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
61 else {
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
62 decode_plmn_3bytes(dp, ascbuf, 1);
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
63 fputs(ascbuf, outf);
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 }
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 }
109
8a27f45bc1e6 fc-simtool fplmn-dump: support output redirection
Mychaela Falconia <falcon@freecalypso.org>
parents: 103
diff changeset
66 putc('\n', outf);
53
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 return(0);
4eb447be01c0 fc-simtool plmnsel-dump implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 }
99
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
69
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
70 cmd_fplmn_write(argc, argv)
99
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
71 char **argv;
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
72 {
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
73 int rc;
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
74 unsigned idx;
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
75 u_char rec[3];
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
76
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
77 rc = select_ef_fplmn();
99
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
78 if (rc < 0)
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
79 return(rc);
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
80 idx = strtoul(argv[1], 0, 0);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
81 if (idx >= 4) {
99
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
82 fprintf(stderr, "error: specified index is out of range\n");
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
83 return(-1);
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
84 }
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
85 rc = encode_plmn_3bytes(argv[2], rec);
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
86 if (rc < 0)
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
87 return(rc);
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
88 return update_bin_op(idx * 3, rec, 3);
d2e800abd257 fc-simtool plmnsel-write command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
89 }
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
90
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
91 cmd_fplmn_erase(argc, argv)
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
92 char **argv;
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
93 {
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
94 int rc;
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
95 unsigned idx, start, end;
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
96 u_char rec[3];
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
97
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
98 rc = select_ef_fplmn();
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
99 if (rc < 0)
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
100 return(rc);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
101 start = strtoul(argv[1], 0, 0);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
102 if (start >= 4) {
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
103 fprintf(stderr,
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
104 "error: specified starting index is out of range\n");
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
105 return(-1);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
106 }
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
107 if (!argv[2])
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
108 end = start;
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
109 else if (!strcmp(argv[2], "end"))
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
110 end = 3;
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
111 else {
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
112 end = strtoul(argv[1], 0, 0);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
113 if (end >= 4) {
100
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
114 fprintf(stderr,
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
115 "error: specified ending index is out of range\n");
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
116 return(-1);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
117 }
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
118 if (start > end) {
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
119 fprintf(stderr,
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
120 "error: reverse index range specified\n");
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
121 return(-1);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
122 }
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
123 }
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
124 memset(rec, 0xFF, 3);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
125 for (idx = start; idx <= end; idx++) {
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
126 rc = update_bin_op(idx * 3, rec, 3);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
127 if (rc < 0)
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
128 return(rc);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
129 }
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
130 return(0);
a75c0aafb367 plmnsel-erase command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 99
diff changeset
131 }
102
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
132
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
133 cmd_fplmn_erase_all(argc, argv)
102
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
134 char **argv;
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
135 {
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
136 int rc;
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
137 u_char ffbuf[12];
102
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
138
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
139 rc = select_ef_fplmn();
102
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
140 if (rc < 0)
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
141 return(rc);
103
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
142 memset(ffbuf, 0xFF, 12);
9b2cb2b9c910 fc-simtool fplmn-* commands implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 102
diff changeset
143 return update_bin_op(0, ffbuf, 12);
102
9ce95d9c5c34 plmnsel-erase-all command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 101
diff changeset
144 }