annotate rvinterf/etmsync/fscmdtab.c @ 929:ab771ce34fac

rvinterf/lowlevel/format.c: get rid of static fmtbuf
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 23 May 2023 05:56:08 +0000
parents 37b38b1a1136
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * fc-fsio command dispatch table
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include "cmdtab.h"
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
594
2c75cf810146 fc-fsio: cleandir command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 592
diff changeset
7 extern int cmd_cleandir();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 extern int cmd_cpout();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 extern int cmd_cpout_file();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 extern int cmd_delete();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 extern int cmd_dieid();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 extern int cmd_exec();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 extern int cmd_exit();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 extern int cmd_fd();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 extern int cmd_ffs2ver();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 extern int cmd_format();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 extern int cmd_fwrite();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 extern int cmd_hd();
27
24cb10d508d7 fc-fsio help command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
19 extern int cmd_help();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 extern int cmd_ll();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 extern int cmd_ls();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 extern int cmd_memdump();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 extern int cmd_mkdir();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 extern int cmd_omemdump();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 extern int cmd_preformat();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 extern int cmd_readlink();
595
e6fe9d25377a fc-fsio: rm-subtree command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 594
diff changeset
27 extern int cmd_rm_subtree();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 extern int cmd_set_imeisv();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 extern int cmd_set_pcm_string();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 extern int cmd_set_rfcap();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 extern int cmd_stat();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 extern int cmd_symlink();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 extern int cmd_uploadfs();
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 extern int cmd_upload_file();
307
67d57375e3ad fc-fsio upload-rf-table implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 27
diff changeset
35 extern int cmd_upload_rf_table();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 extern int cmd_upload_subtree();
754
2cd5ac909e23 fc-fsio write-battery-table replaced with write-battery-table-{v1,v2}
Mychaela Falconia <falcon@freecalypso.org>
parents: 595
diff changeset
37 extern int cmd_write_battery_table_v1();
2cd5ac909e23 fc-fsio write-battery-table replaced with write-battery-table-{v1,v2}
Mychaela Falconia <falcon@freecalypso.org>
parents: 595
diff changeset
38 extern int cmd_write_battery_table_v2();
813
37b38b1a1136 fc-fsio write-bsim-config implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 754
diff changeset
39 extern int cmd_write_bsim_config();
321
0cb766828d7a fc-fsio: implemented write-battery-table and write-charging-config commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 307
diff changeset
40 extern int cmd_write_charging_config();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 extern int create_std_dirs();
15
5cc0791a6eb6 Pirelli etmsync hacks absorbed into fc-fsio
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
43 extern int get_pirelli_imei();
5cc0791a6eb6 Pirelli etmsync hacks absorbed into fc-fsio
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
44 extern int pirelli_magnetite_init();
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 struct cmdtab cmdtab[] = {
594
2c75cf810146 fc-fsio: cleandir command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 592
diff changeset
47 {"cleandir", 1, 1, cmd_cleandir},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 {"cpout", 2, 2, cmd_cpout},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 {"cpout-file", 2, 2, cmd_cpout_file},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 {"create-std-dirs", 0, 0, create_std_dirs},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 {"delete", 1, 1, cmd_delete},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 {"dieid", 0, 0, cmd_dieid},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 {"exec", 1, 1, cmd_exec},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 {"exit", 0, 0, cmd_exit},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 {"fd", 2, 3, cmd_fd},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 {"ffs2ver", 0, 0, cmd_ffs2ver},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 {"format", 1, 1, cmd_format},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 {"fwrite", 3, 3, cmd_fwrite},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 {"hd", 1, 1, cmd_hd},
27
24cb10d508d7 fc-fsio help command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
60 {"help", 0, 1, cmd_help},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 {"ll", 1, 1, cmd_ll},
13
46ad66a231af fc-fsio: finally one can type ls -l and not just the ll abbreviation
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
62 {"ls", 1, 2, cmd_ls},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 {"memdump", 2, 2, cmd_memdump},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 {"mkdir", 1, 1, cmd_mkdir},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 {"mk-std-dirs", 0, 0, create_std_dirs},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 {"omemdump", 2, 2, cmd_omemdump},
15
5cc0791a6eb6 Pirelli etmsync hacks absorbed into fc-fsio
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
67 {"pirelli-get-imei", 0, 0, get_pirelli_imei},
5cc0791a6eb6 Pirelli etmsync hacks absorbed into fc-fsio
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
68 {"pirelli-magnetite-init", 0, 0, pirelli_magnetite_init},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 {"preformat", 0, 0, cmd_preformat},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 {"readlink", 1, 1, cmd_readlink},
592
a0754c98fc2b fc-fsio: rm -f mode implemented (ignore EFFS_NOTFOUND),
Mychaela Falconia <falcon@freecalypso.org>
parents: 591
diff changeset
71 {"rm", 1, 2, cmd_delete},
595
e6fe9d25377a fc-fsio: rm-subtree command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 594
diff changeset
72 {"rm-subtree", 1, 2, cmd_rm_subtree},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 {"set-imeisv", 2, 2, cmd_set_imeisv},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 {"set-pcm-string", 2, 2, cmd_set_pcm_string},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 {"set-rfcap", 1, 1, cmd_set_rfcap},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 {"stat", 1, 1, cmd_stat},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 {"symlink", 2, 2, cmd_symlink},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 {"upload-file", 2, 2, cmd_upload_file},
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 {"upload-fs", 1, 1, cmd_uploadfs},
307
67d57375e3ad fc-fsio upload-rf-table implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 27
diff changeset
80 {"upload-rf-table", 1, 2, cmd_upload_rf_table},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 {"upload-subtree", 2, 2, cmd_upload_subtree},
754
2cd5ac909e23 fc-fsio write-battery-table replaced with write-battery-table-{v1,v2}
Mychaela Falconia <falcon@freecalypso.org>
parents: 595
diff changeset
82 {"write-battery-table-v1", 1, 1, cmd_write_battery_table_v1},
2cd5ac909e23 fc-fsio write-battery-table replaced with write-battery-table-{v1,v2}
Mychaela Falconia <falcon@freecalypso.org>
parents: 595
diff changeset
83 {"write-battery-table-v2", 1, 1, cmd_write_battery_table_v2},
813
37b38b1a1136 fc-fsio write-bsim-config implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 754
diff changeset
84 {"write-bsim-config", 2, 2, cmd_write_bsim_config},
321
0cb766828d7a fc-fsio: implemented write-battery-table and write-charging-config commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 307
diff changeset
85 {"write-charging-config", 1, 1, cmd_write_charging_config},
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 {0, 0, 0, 0}
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 };