Statistics
| Branch: | Revision:

scoutos / prex-0.9.0 / usr / bin / cmdbox / cmd_conf.c @ 03e9c04a

History | View | Annotate | Download (4.48 KB)

1
/*
2
 * Copyright (c) 2007, Kohsuke Ohtani
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 * 3. Neither the name of the author nor the names of any co-contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 * SUCH DAMAGE.
28
 */
29

    
30
#include <sys/param.h>
31
#include "cmdbox.h"
32

    
33
extern int help_main(int argc, char *argv[]);
34
extern int cat_main(int argc, char *argv[]);
35
extern int clear_main(int argc, char *argv[]);
36
extern int cp_main(int argc, char *argv[]);
37
extern int date_main(int argc, char *argv[]);
38
extern int dmesg_main(int argc, char *argv[]);
39
extern int echo_main(int argc, char *argv[]);
40
extern int free_main(int argc, char *argv[]);
41
extern int head_main(int argc, char *argv[]);
42
extern int hostname_main(int argc, char *argv[]);
43
extern int kill_main(int argc, char *argv[]);
44
extern int ls_main(int argc, char *argv[]);
45
extern int mkdir_main(int argc, char *argv[]);
46
extern int more_main(int argc, char *argv[]);
47
extern int mv_main(int argc, char *argv[]);
48
extern int nice_main(int argc, char *argv[]);
49
extern int printenv_main(int argc, char *argv[]);
50
extern int ps_main(int argc, char *argv[]);
51
extern int pwd_main(int argc, char *argv[]);
52
extern int rm_main(int argc, char *argv[]);
53
extern int rmdir_main(int argc, char *argv[]);
54
extern int sleep_main(int argc, char *argv[]);
55
extern int sync_main(int argc, char *argv[]);
56
extern int test_main(int argc, char *argv[]);
57
extern int touch_main(int argc, char *argv[]);
58
extern int uname_main(int argc, char *argv[]);
59
extern int null_main(int argc, char *argv[]);
60

    
61
/*
62
 * Bultin commands
63
 */
64
const struct cmdentry builtin_cmds[] = {
65
#ifdef CONFIG_CMD_CAT
66
        { "cat"      ,cat_main        },
67
#endif
68
#ifdef CONFIG_CMD_CLEAR
69
        { "clear"    ,clear_main      },
70
#endif
71
#ifdef CONFIG_CMD_CP
72
        { "cp"       ,cp_main         },
73
#endif
74
#ifdef CONFIG_CMD_DATE
75
        { "date"     ,date_main       },
76
#endif
77
#ifdef CONFIG_CMD_DMESG
78
        { "dmesg"    ,dmesg_main      },
79
#endif
80
#ifdef CONFIG_CMD_ECHO
81
        { "echo"     ,echo_main       },
82
#endif
83
#ifdef CONFIG_CMD_FREE
84
        { "free"     ,free_main       },
85
#endif
86
#ifdef CONFIG_CMD_HEAD
87
        { "head"     ,head_main   },
88
#endif
89
        { "help"     ,help_main       },
90
#ifdef CONFIG_CMD_HOSTNAME
91
        { "hostname" ,hostname_main   },
92
#endif
93
#ifdef CONFIG_CMD_KILL
94
        { "kill"     ,kill_main       },
95
#endif
96
#ifdef CONFIG_CMD_LS
97
        { "ls"       ,ls_main         },
98
#endif
99
#ifdef CONFIG_CMD_MKDIR
100
        { "mkdir"    ,mkdir_main      },
101
#endif
102
#ifdef CONFIG_CMD_MORE
103
        { "more"     ,more_main       },
104
#endif
105
#ifdef CONFIG_CMD_MV
106
        { "mv"       ,mv_main         },
107
#endif
108
#ifdef CONFIG_CMD_NICE
109
        { "nice"     ,nice_main       },
110
#endif
111
#ifdef CONFIG_CMD_PRINTENV
112
        { "printenv" ,printenv_main   },
113
#endif
114
#ifdef CONFIG_CMD_PS
115
        { "ps"       ,ps_main         },
116
#endif
117
#ifdef CONFIG_CMD_PWD
118
        { "pwd"      ,pwd_main        },
119
#endif
120
#ifdef CONFIG_CMD_RM
121
        { "rm"       ,rm_main         },
122
#endif
123
#ifdef CONFIG_CMD_RMDIR
124
        { "rmdir"    ,rmdir_main      },
125
#endif
126
#ifdef CONFIG_CMD_SLEEP
127
        { "sleep"    ,sleep_main      },
128
#endif
129
#ifdef CONFIG_CMD_SYNC
130
        { "sync"     ,sync_main       },
131
#endif
132
#ifdef CONFIG_CMD_TEST
133
        { "test"     ,test_main       },
134
#endif
135
#ifdef CONFIG_CMD_TOUCH
136
        { "touch"    ,touch_main      },
137
#endif
138
#ifdef CONFIG_CMD_UNAME
139
        { "uname"    ,uname_main      },
140
#endif
141
        { NULL       ,null_main       },
142
};