source: mainline/uspace/app/bdsh/cmds/modules/modules.c@ ab936440

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since ab936440 was ab936440, checked in by Matthieu Riolo <matthieu.riolo@…>, 6 years ago

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

  • Property mode set to 100644
File size: 3.3 KB
Line 
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/*
30 * Each built in function has two files, one being an entry.h file which
31 * prototypes the run/help entry functions, the other being a .def file
32 * which fills the modules[] array according to the cmd_t structure
33 * defined in cmds.h.
34 *
35 * To add or remove a module, just make a new directory in cmds/modules
36 * for it and copy the 'show' example for basics, then include it here.
37 * (or reverse the process to remove one)
38 *
39 * NOTE: See module_ aliases.h as well, this is where aliases (commands that
40 * share an entry point with others) are indexed
41 */
42
43#include "config.h"
44#include "modules.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 "cat/entry.h"
53#include "touch/entry.h"
54#include "ls/entry.h"
55#include "pwd/entry.h"
56#include "sleep/entry.h"
57#include "cp/entry.h"
58#include "mv/entry.h"
59#include "mount/entry.h"
60#include "unmount/entry.h"
61#include "kcon/entry.h"
62#include "printf/entry.h"
63#include "echo/entry.h"
64#include "cmp/entry.h"
65#include "alias/entry.h"
66#include "unalias/entry.h"
67
68/*
69 * Each .def function fills the module_t struct with the individual name, entry
70 * point, help entry point, etc. You can use config.h to control what modules
71 * are loaded based on what libraries exist on the system.
72 */
73
74module_t modules[] = {
75#include "help/help_def.inc"
76#include "mkdir/mkdir_def.inc"
77#include "mkfile/mkfile_def.inc"
78#include "rm/rm_def.inc"
79#include "cat/cat_def.inc"
80#include "touch/touch_def.inc"
81#include "ls/ls_def.inc"
82#include "pwd/pwd_def.inc"
83#include "sleep/sleep_def.inc"
84#include "cp/cp_def.inc"
85#include "mv/mv_def.inc"
86#include "mount/mount_def.inc"
87#include "unmount/unmount_def.inc"
88#include "kcon/kcon_def.inc"
89#include "printf/printf_def.inc"
90#include "echo/echo_def.inc"
91#include "cmp/cmp_def.inc"
92#include "alias/alias_def.inc"
93#include "unalias/unalias_def.inc"
94
95 { NULL, NULL, NULL, NULL }
96};
Note: See TracBrowser for help on using the repository browser.