1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef foominecctlcommandshfoo
#define foominecctlcommandshfoo
enum commands {
CMD_INVALID = 0,
CMD_INIT,
CMD_NEW,
CMD_LIST,
CMD_LINT,
CMD_INFO,
CMD_STATUS,
CMD_STOP,
CMD_STOPALL,
CMD_PCOUNT,
CMD_COMMAND,
CMD_COMMANDS,
CMD_CONSOLE,
};
static struct command_list {
const char *name;
enum commands cmd;
} command_list[] = { {
.name = "init",
.cmd = CMD_INIT,
},
{
.name = "new",
.cmd = CMD_NEW,
},
{
.name = "list",
.cmd = CMD_LIST,
},
{
.name = "lint",
.cmd = CMD_LINT,
},
{
.name = "info",
.cmd = CMD_INFO,
},
{
.name = "status",
.cmd = CMD_STATUS,
},
{
.name = "stop",
.cmd = CMD_STOP,
},
{
.name = "stopall",
.cmd = CMD_STOPALL,
},
{
.name = "pcount",
.cmd = CMD_PCOUNT,
},
{
.name = "cmd",
.cmd = CMD_COMMAND,
},
{
.name = "cmds",
.cmd = CMD_COMMANDS,
},
{
.name = "console",
.cmd = CMD_CONSOLE,
},
{
.name = NULL,
.cmd = CMD_INVALID,
} };
#endif
|