1 | /*
|
---|
2 | * Copyright (c) 2008 Tim Post
|
---|
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 | *
|
---|
9 | * - Redistributions of source code must retain the above copyright
|
---|
10 | * notice, this list of conditions and the following disclaimer.
|
---|
11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
12 | * notice, this list of conditions and the following disclaimer in the
|
---|
13 | * documentation and/or other materials provided with the distribution.
|
---|
14 | * - The name of the author may not be used to endorse or promote products
|
---|
15 | * derived from this software without specific prior written permission.
|
---|
16 | *
|
---|
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
27 | */
|
---|
28 |
|
---|
29 | #ifndef MODULES_H
|
---|
30 | #define MODULES_H
|
---|
31 |
|
---|
32 | /* Each built in function has two files, one being an entry.h file which
|
---|
33 | * prototypes the run/help entry functions, the other being a .def file
|
---|
34 | * which fills the modules[] array according to the cmd_t structure
|
---|
35 | * defined in cmds.h.
|
---|
36 | *
|
---|
37 | * To add or remove a module, just make a new directory in cmds/modules
|
---|
38 | * for it and copy the 'show' example for basics, then include it here.
|
---|
39 | * (or reverse the process to remove one)
|
---|
40 | *
|
---|
41 | * NOTE: See module_ aliases.h as well, this is where aliases (commands that
|
---|
42 | * share an entry point with others) are indexed */
|
---|
43 |
|
---|
44 | #include "config.h"
|
---|
45 |
|
---|
46 | /* Prototypes for each module's entry (help/exec) points */
|
---|
47 |
|
---|
48 | #include "help/entry.h"
|
---|
49 | #include "mkdir/entry.h"
|
---|
50 | #include "mkfile/entry.h"
|
---|
51 | #include "rm/entry.h"
|
---|
52 | #include "bdd/entry.h"
|
---|
53 | #include "cat/entry.h"
|
---|
54 | #include "touch/entry.h"
|
---|
55 | #include "ls/entry.h"
|
---|
56 | #include "pwd/entry.h"
|
---|
57 | #include "sleep/entry.h"
|
---|
58 | #include "cp/entry.h"
|
---|
59 | #include "mv/entry.h"
|
---|
60 | #include "mount/entry.h"
|
---|
61 | #include "unmount/entry.h"
|
---|
62 | #include "kcon/entry.h"
|
---|
63 | #include "printf/entry.h"
|
---|
64 | #include "echo/entry.h"
|
---|
65 |
|
---|
66 | /* Each .def function fills the module_t struct with the individual name, entry
|
---|
67 | * point, help entry point, etc. You can use config.h to control what modules
|
---|
68 | * are loaded based on what libraries exist on the system. */
|
---|
69 |
|
---|
70 | module_t modules[] = {
|
---|
71 | #include "help/help_def.h"
|
---|
72 | #include "mkdir/mkdir_def.h"
|
---|
73 | #include "mkfile/mkfile_def.h"
|
---|
74 | #include "rm/rm_def.h"
|
---|
75 | #include "bdd/bdd_def.h"
|
---|
76 | #include "cat/cat_def.h"
|
---|
77 | #include "touch/touch_def.h"
|
---|
78 | #include "ls/ls_def.h"
|
---|
79 | #include "pwd/pwd_def.h"
|
---|
80 | #include "sleep/sleep_def.h"
|
---|
81 | #include "cp/cp_def.h"
|
---|
82 | #include "mv/mv_def.h"
|
---|
83 | #include "mount/mount_def.h"
|
---|
84 | #include "unmount/unmount_def.h"
|
---|
85 | #include "kcon/kcon_def.h"
|
---|
86 | #include "printf/printf_def.h"
|
---|
87 | #include "echo/echo_def.h"
|
---|
88 |
|
---|
89 | {NULL, NULL, NULL, NULL}
|
---|
90 | };
|
---|
91 |
|
---|
92 | #endif
|
---|