FreeCalypso > hg > fc-pcsc-tools
annotate uicc/bfsearch.c @ 160:b86b3f8890ba
libutil: shorthand decimal string parsing implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 26 Feb 2021 21:04:11 +0000 |
parents | 5f1f3f6fd865 |
children |
rev | line source |
---|---|
145
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
2 * This module implements a brute force search of file ID space, |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
3 * both MF and ADF trees. |
145
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <sys/types.h> |
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdio.h> |
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "simresp.h" |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
9 #include "file_id.h" |
145
c2889812788e
fc-simtool bfsearch implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
11 extern u_char *extract_select_resp_tag(); |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
12 |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
13 static |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
14 bfsearch_dir(path, pathlen, siblings, nsiblings, outf) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
15 unsigned *path, pathlen, *siblings, nsiblings; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
16 FILE *outf; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
17 { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
18 unsigned bfs, n; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
19 unsigned df_children[255], ndfc; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
20 unsigned childpath[8]; |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
21 u_char *tlv_file_desc, *tlv_file_size; |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
22 int rc; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
23 |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
24 for (n = 0; n < pathlen; n++) { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
25 rc = elem_select_op(path[n]); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
26 if (rc < 0) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
27 return(rc); |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
28 if ((sim_resp_sw & 0xFF00) != 0x6100) { |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
29 fprintf(stderr, |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
30 "error selecting 0x%04X: SW resp 0x%04X\n", |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
31 path[n], sim_resp_sw); |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
32 return(-1); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
33 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
34 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
35 ndfc = 0; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
36 for (bfs = 0; bfs <= 0xFFFF; bfs++) { |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
37 if (bfs == FILEID_MF || bfs == FILEID_ADF) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
38 continue; |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
39 for (n = 0; n < pathlen; n++) { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
40 if (bfs == path[n]) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
41 break; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
42 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
43 if (n < pathlen) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
44 continue; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
45 for (n = 0; n < nsiblings; n++) { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
46 if (bfs == siblings[n]) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
47 break; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
48 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
49 if (n < nsiblings) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
50 continue; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
51 rc = elem_select_op(bfs); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
52 if (rc < 0) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
53 return(rc); |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
54 if (sim_resp_sw == 0x6A82) |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
55 continue; |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
56 if ((sim_resp_sw & 0xFF00) != 0x6100) { |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
57 for (n = 0; n < pathlen; n++) |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
58 fprintf(outf, "%04X/", path[n]); |
156
5f1f3f6fd865
fc-uicc-tool bfsearch: missing newline in output
Mychaela Falconia <falcon@freecalypso.org>
parents:
155
diff
changeset
|
59 fprintf(outf, "%04X: SW response 0x%04X\n", bfs, |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
60 sim_resp_sw); |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
61 continue; |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
62 } |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
63 rc = get_response_op(); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
64 if (rc < 0) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
65 return(rc); |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
66 tlv_file_desc = extract_select_resp_tag(0x82); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
67 if (!tlv_file_desc) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
68 return(-1); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
69 if (tlv_file_desc[1] < 1) { |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
70 fprintf(stderr, |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
71 "error: file desc TLV object is too short\n"); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
72 return(-1); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
73 } |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
74 for (n = 0; n < pathlen; n++) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
75 fprintf(outf, "%04X/", path[n]); |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
76 fprintf(outf, "%04X: file desc 0x%02X", bfs, tlv_file_desc[2]); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
77 if ((tlv_file_desc[2] & 0xBF) == 0x38) { |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
78 fprintf(outf, ", DF\n"); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
79 if (ndfc < 255) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
80 df_children[ndfc++] = bfs; |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
81 } else { |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
82 tlv_file_size = extract_select_resp_tag(0x80); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
83 if (tlv_file_size && tlv_file_size[1] == 2) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
84 fprintf(outf, ", total size %u", |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
85 (tlv_file_size[2] << 8) | |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
86 tlv_file_size[3]); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
87 if (tlv_file_desc[1] == 5) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
88 fprintf(outf, ", %u records of %u bytes", |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
89 tlv_file_desc[6], |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
90 (tlv_file_desc[4] << 8) | |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
91 tlv_file_desc[5]); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
92 putc('\n', outf); |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
93 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
94 rc = elem_select_op(path[pathlen-1]); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
95 if (rc < 0) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
96 return(rc); |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
97 if ((sim_resp_sw & 0xFF00) != 0x6100) { |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
98 fprintf(stderr, |
155
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
99 "reselecting starting file ID 0x%04X: SW resp 0x%04X\n", |
cb3c40ff443e
fc-uicc-tool bfsearch: handle more weird SW response cases
Mychaela Falconia <falcon@freecalypso.org>
parents:
153
diff
changeset
|
100 path[pathlen-1], sim_resp_sw); |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
101 return(-1); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
102 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
103 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
104 if (pathlen >= 8) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
105 return(0); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
106 for (n = 0; n < pathlen; n++) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
107 childpath[n] = path[n]; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
108 for (n = 0; n < ndfc; n++) { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
109 childpath[pathlen] = df_children[n]; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
110 rc = bfsearch_dir(childpath, pathlen + 1, df_children, ndfc, |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
111 outf); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
112 if (rc < 0) |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
113 return(rc); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
114 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
115 return(0); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
116 } |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
117 |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
118 cmd_bfsearch_mf(argc, argv, outf) |
149
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
119 char **argv; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
120 FILE *outf; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
121 { |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
122 unsigned initpath; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
123 |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
124 initpath = FILEID_MF; |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
125 return bfsearch_dir(&initpath, 1, &initpath, 1, outf); |
26d7a8815515
fc-simtool bfsearch-full implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
148
diff
changeset
|
126 } |
153
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
127 |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
128 cmd_bfsearch_adf(argc, argv, outf) |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
129 char **argv; |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
130 FILE *outf; |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
131 { |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
132 unsigned initpath; |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
133 |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
134 initpath = FILEID_ADF; |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
135 return bfsearch_dir(&initpath, 1, &initpath, 1, outf); |
2ef31306be22
fc-uicc-tool bfsearch-{adf,mf} implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
149
diff
changeset
|
136 } |