source: rtems/cpukit/libmisc/shell/shellconfig.h @ 06f8e558

4.104.115
Last change on this file since 06f8e558 was 06f8e558, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 02/27/09 at 11:03:57
  • libmisc/shell/shell.c, libmisc/shell/shell.h: Changed type for boolean values from 'int' to 'bool'. Added option 'login' to enable or disable a login prompt. Changed intialization of global shell environment to static initialization. Changed stack size type to 'size_t' conforming to classic API.
  • libmisc/shell/shellconfig.h: Fixed some typos.
  • Property mode set to 100644
File size: 13.6 KB
Line 
1/*
2 *  RTEMS Shell Command Set Configuration
3 *
4 *  COPYRIGHT (c) 1989-2007.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#ifndef _RTEMS_SHELL_CONFIG_h
15#define _RTEMS_SHELL_CONFIG_h
16
17#include <rtems/shell.h>
18
19/*
20 *  Externs for all command definition structures
21 */
22extern rtems_shell_cmd_t rtems_shell_HELP_Command;
23extern rtems_shell_cmd_t rtems_shell_ALIAS_Command;
24extern rtems_shell_cmd_t rtems_shell_LOGOFF_Command;
25
26extern rtems_shell_cmd_t rtems_shell_MDUMP_Command;
27extern rtems_shell_cmd_t rtems_shell_WDUMP_Command;
28extern rtems_shell_cmd_t rtems_shell_MEDIT_Command;
29extern rtems_shell_cmd_t rtems_shell_MFILL_Command;
30extern rtems_shell_cmd_t rtems_shell_MMOVE_Command;
31
32extern rtems_shell_cmd_t rtems_shell_JOEL_Command;
33extern rtems_shell_cmd_t rtems_shell_DATE_Command;
34extern rtems_shell_cmd_t rtems_shell_ECHO_Command;
35extern rtems_shell_cmd_t rtems_shell_SLEEP_Command;
36extern rtems_shell_cmd_t rtems_shell_ID_Command;
37extern rtems_shell_cmd_t rtems_shell_TTY_Command;
38extern rtems_shell_cmd_t rtems_shell_WHOAMI_Command;
39
40extern rtems_shell_cmd_t rtems_shell_CP_Command;
41extern rtems_shell_cmd_t rtems_shell_PWD_Command;
42extern rtems_shell_cmd_t rtems_shell_LS_Command;
43extern rtems_shell_cmd_t rtems_shell_CHDIR_Command;
44extern rtems_shell_cmd_t rtems_shell_MKDIR_Command;
45extern rtems_shell_cmd_t rtems_shell_RMDIR_Command;
46extern rtems_shell_cmd_t rtems_shell_CHROOT_Command;
47extern rtems_shell_cmd_t rtems_shell_CHMOD_Command;
48extern rtems_shell_cmd_t rtems_shell_CAT_Command;
49extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Command;
50extern rtems_shell_cmd_t rtems_shell_MV_Command;
51extern rtems_shell_cmd_t rtems_shell_RM_Command;
52extern rtems_shell_cmd_t rtems_shell_UMASK_Command;
53extern rtems_shell_cmd_t rtems_shell_MOUNT_Command;
54extern rtems_shell_cmd_t rtems_shell_UNMOUNT_Command;
55extern rtems_shell_cmd_t rtems_shell_BLKSYNC_Command;
56
57extern rtems_shell_cmd_t rtems_shell_HALT_Command;
58extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
59extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
60extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
61extern rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command;
62extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command;
63#if RTEMS_NETWORKING
64  extern rtems_shell_cmd_t rtems_shell_IFCONFIG_Command;
65  extern rtems_shell_cmd_t rtems_shell_ROUTE_Command;
66  extern rtems_shell_cmd_t rtems_shell_NETSTATS_Command;
67#endif
68
69extern rtems_shell_cmd_t *rtems_shell_Initial_commands[];
70
71/*
72 *  Extern for alias commands
73 */
74extern rtems_shell_alias_t rtems_shell_DIR_Alias;
75extern rtems_shell_alias_t rtems_shell_CD_Alias;
76extern rtems_shell_alias_t rtems_shell_EXIT_Alias;
77
78extern rtems_shell_alias_t *rtems_shell_Initial_aliases[];
79
80/*
81 *  Externs for mount command helpers
82 */
83extern rtems_shell_filesystems_t rtems_shell_Mount_MSDOS;
84extern rtems_shell_filesystems_t rtems_shell_Mount_TFTP;
85extern rtems_shell_filesystems_t rtems_shell_Mount_FTP;
86extern rtems_shell_filesystems_t rtems_shell_Mount_NFS;
87
88extern rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[];
89
90/*
91 *  If we are configured to alias a command, then make sure the underlying
92 *  command is configured.
93 */
94
95#if !defined(CONFIGURE_SHELL_COMMANDS_ALL)
96  #if defined(CONFIGURE_SHELL_COMMANDS_DIR) && \
97      !defined(CONFIGURE_SHELL_COMMANDS_LS)
98    #define CONFIGURE_SHELL_COMMAND_LS
99  #endif
100
101  #if defined(CONFIGURE_SHELL_COMMANDS_CD) && \
102      !defined(CONFIGURE_SHELL_COMMANDS_CHDIR)
103    #define CONFIGURE_SHELL_COMMAND_CHDIR
104  #endif
105
106  #if defined(CONFIGURE_SHELL_COMMANDS_EXIT) && \
107      !defined(CONFIGURE_SHELL_COMMANDS_LOGOFF)
108    #define CONFIGURE_SHELL_COMMAND_LOGOFF
109  #endif
110#endif
111
112#if defined(CONFIGURE_SHELL_COMMANDS_INIT)
113  rtems_shell_alias_t *rtems_shell_Initial_aliases[] = {
114    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
115         !defined(CONFIGURE_SHELL_NO_COMMAND_DIR)) || \
116        defined(CONFIGURE_SHELL_COMMAND_DIR)
117      &rtems_shell_DIR_Alias,
118    #endif
119    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
120         !defined(CONFIGURE_SHELL_NO_COMMAND_CD)) || \
121        defined(CONFIGURE_SHELL_COMMAND_CD)
122      &rtems_shell_CD_Alias,
123    #endif
124    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
125         !defined(CONFIGURE_SHELL_NO_COMMAND_EXIT)) || \
126        defined(CONFIGURE_SHELL_COMMAND_EXIT)
127      &rtems_shell_EXIT_Alias,
128    #endif
129
130    /*
131     *  User defined shell aliases
132     */
133    #if defined(CONFIGURE_SHELL_USER_ALIASES)
134      CONFIGURE_SHELL_USER_ALIASES,
135    #endif
136    NULL
137  };
138
139  rtems_shell_cmd_t *rtems_shell_Initial_commands[] = {
140    /*
141     *  General comamnds that should be present
142     */
143    &rtems_shell_HELP_Command,
144    &rtems_shell_ALIAS_Command,
145
146    /*
147     *  Common commands that can be optional
148     */
149    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
150         !defined(CONFIGURE_SHELL_NO_COMMAND_JOEL)) || \
151        defined(CONFIGURE_SHELL_COMMAND_JOEL)
152      &rtems_shell_JOEL_Command,
153    #endif
154    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
155         !defined(CONFIGURE_SHELL_NO_COMMAND_DATE)) || \
156        defined(CONFIGURE_SHELL_COMMAND_DATE)
157      &rtems_shell_DATE_Command,
158    #endif
159    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
160         !defined(CONFIGURE_SHELL_NO_COMMAND_ECHO)) || \
161        defined(CONFIGURE_SHELL_COMMAND_ECHO)
162      &rtems_shell_ECHO_Command,
163    #endif
164    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
165         !defined(CONFIGURE_SHELL_NO_COMMAND_SLEEP)) || \
166        defined(CONFIGURE_SHELL_COMMAND_SLEEP)
167      &rtems_shell_SLEEP_Command,
168    #endif
169    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
170         !defined(CONFIGURE_SHELL_NO_COMMAND_ID)) || \
171        defined(CONFIGURE_SHELL_COMMAND_ID)
172      &rtems_shell_ID_Command,
173    #endif
174    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
175         !defined(CONFIGURE_SHELL_NO_COMMAND_TTY)) || \
176        defined(CONFIGURE_SHELL_COMMAND_TTY)
177      &rtems_shell_TTY_Command,
178    #endif
179    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
180         !defined(CONFIGURE_SHELL_NO_COMMAND_WHOAMI)) || \
181        defined(CONFIGURE_SHELL_COMMAND_WHOAMI)
182      &rtems_shell_WHOAMI_Command,
183    #endif
184    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
185         !defined(CONFIGURE_SHELL_NO_COMMAND_LOGOFF)) || \
186        defined(CONFIGURE_SHELL_COMMAND_LOGOFF)
187      &rtems_shell_LOGOFF_Command,
188    #endif
189
190    /*
191     *  Memory printing/modification family commands
192     */
193    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
194        !defined(CONFIGURE_SHELL_NO_COMMAND_MDUMP)) || \
195        defined(CONFIGURE_SHELL_COMMAND_MDUMP)
196      &rtems_shell_MDUMP_Command,
197    #endif
198    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
199         !defined(CONFIGURE_SHELL_NO_COMMAND_WDUMP)) || \
200        defined(CONFIGURE_SHELL_COMMAND_WDUMP)
201      &rtems_shell_WDUMP_Command,
202    #endif
203    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
204         !defined(CONFIGURE_SHELL_NO_COMMAND_MEDIT)) || \
205        defined(CONFIGURE_SHELL_COMMAND_MEDIT)
206      &rtems_shell_MEDIT_Command,
207    #endif
208    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
209         !defined(CONFIGURE_SHELL_NO_COMMAND_MFILL)) || \
210        defined(CONFIGURE_SHELL_COMMAND_MFILL)
211      &rtems_shell_MFILL_Command,
212    #endif
213    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
214         !defined(CONFIGURE_SHELL_NO_COMMAND_MMOVE)) || \
215        defined(CONFIGURE_SHELL_COMMAND_MMOVE)
216      &rtems_shell_MMOVE_Command,
217    #endif
218
219    /*
220     *  File and directory commands
221     */
222    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
223         !defined(CONFIGURE_SHELL_NO_COMMAND_CP)) || \
224        defined(CONFIGURE_SHELL_COMMAND_CP)
225      &rtems_shell_CP_Command,
226    #endif
227    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
228         !defined(CONFIGURE_SHELL_NO_COMMAND_PWD)) || \
229        defined(CONFIGURE_SHELL_COMMAND_PWD)
230      &rtems_shell_PWD_Command,
231    #endif
232    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
233         !defined(CONFIGURE_SHELL_NO_COMMAND_LS)) || \
234        defined(CONFIGURE_SHELL_COMMAND_LS)
235      &rtems_shell_LS_Command,
236    #endif
237    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
238         !defined(CONFIGURE_SHELL_NO_COMMAND_CHDIR)) || \
239        defined(CONFIGURE_SHELL_COMMAND_CHDIR)
240      &rtems_shell_CHDIR_Command,
241    #endif
242    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
243         !defined(CONFIGURE_SHELL_NO_COMMAND_MKDIR)) || \
244        defined(CONFIGURE_SHELL_COMMAND_MKDIR)
245      &rtems_shell_MKDIR_Command,
246    #endif
247    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
248         !defined(CONFIGURE_SHELL_NO_COMMAND_RMDIR)) || \
249        defined(CONFIGURE_SHELL_COMMAND_RMDIR)
250      &rtems_shell_RMDIR_Command,
251    #endif
252    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
253         !defined(CONFIGURE_SHELL_NO_COMMAND_CHROOT)) || \
254        defined(CONFIGURE_SHELL_COMMAND_CHROOT)
255      &rtems_shell_CHROOT_Command,
256    #endif
257    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
258         !defined(CONFIGURE_SHELL_NO_COMMAND_CHMOD)) || \
259        defined(CONFIGURE_SHELL_COMMAND_CHMOD)
260      &rtems_shell_CHMOD_Command,
261    #endif
262    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
263         !defined(CONFIGURE_SHELL_NO_COMMAND_CAT)) || \
264        defined(CONFIGURE_SHELL_COMMAND_CAT)
265      &rtems_shell_CAT_Command,
266    #endif
267    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
268         !defined(CONFIGURE_SHELL_NO_COMMAND_MSDOSFMT)) || \
269        defined(CONFIGURE_SHELL_COMMAND_MSDOSFMT)
270      &rtems_shell_MSDOSFMT_Command,
271    #endif
272    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
273         !defined(CONFIGURE_SHELL_NO_COMMAND_MV)) || \
274        defined(CONFIGURE_SHELL_COMMAND_MV)
275      &rtems_shell_MV_Command,
276    #endif
277    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
278         !defined(CONFIGURE_SHELL_NO_COMMAND_RM)) || \
279        defined(CONFIGURE_SHELL_COMMAND_RM)
280      &rtems_shell_RM_Command,
281    #endif
282    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
283         !defined(CONFIGURE_SHELL_NO_COMMAND_UMASK)) || \
284        defined(CONFIGURE_SHELL_COMMAND_UMASK)
285      &rtems_shell_UMASK_Command,
286    #endif
287    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
288         !defined(CONFIGURE_SHELL_NO_COMMAND_MOUNT)) || \
289        defined(CONFIGURE_SHELL_COMMAND_MOUNT)
290      &rtems_shell_MOUNT_Command,
291    #endif
292    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
293         !defined(CONFIGURE_SHELL_NO_COMMAND_UNMOUNT)) || \
294        defined(CONFIGURE_SHELL_COMMAND_UNMOUNT)
295      &rtems_shell_UNMOUNT_Command,
296    #endif
297    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
298         !defined(CONFIGURE_SHELL_NO_COMMAND_BLKSYNC)) || \
299        defined(CONFIGURE_SHELL_COMMAND_BLKSYNC)
300      &rtems_shell_BLKSYNC_Command,
301    #endif
302
303    /*
304     *  RTEMS Related commands
305     */
306    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
307         !defined(CONFIGURE_SHELL_NO_COMMAND_HALT)) || \
308        defined(CONFIGURE_SHELL_COMMAND_HALT)
309      &rtems_shell_HALT_Command,
310    #endif
311    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
312         !defined(CONFIGURE_SHELL_NO_COMMAND_CPUUSE)) || \
313        defined(CONFIGURE_SHELL_COMMAND_CPUUSE)
314      &rtems_shell_CPUUSE_Command,
315    #endif
316    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
317         !defined(CONFIGURE_SHELL_NO_COMMAND_STACKUSE)) || \
318        defined(CONFIGURE_SHELL_COMMAND_STACKUSE)
319      &rtems_shell_STACKUSE_Command,
320    #endif
321    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
322         !defined(CONFIGURE_SHELL_NO_COMMAND_PERIODUSE)) || \
323        defined(CONFIGURE_SHELL_COMMAND_PERIODUSE)
324      &rtems_shell_PERIODUSE_Command,
325    #endif
326    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
327         !defined(CONFIGURE_SHELL_NO_COMMAND_WKSPACE_INFO)) || \
328        defined(CONFIGURE_SHELL_COMMAND_WKSPACE_INFO)
329      &rtems_shell_WKSPACE_INFO_Command,
330    #endif
331
332
333    /*
334     *  Malloc family commands
335     */
336    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
337         !defined(CONFIGURE_SHELL_NO_COMMAND_MALLOC_INFO)) || \
338        defined(CONFIGURE_SHELL_COMMAND_MALLOC_INFO)
339      &rtems_shell_MALLOC_INFO_Command,
340    #endif
341
342    /*
343     *  Network related commands
344     */
345    #if RTEMS_NETWORKING
346      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
347           !defined(CONFIGURE_SHELL_NO_COMMAND_IFCONFIG)) || \
348          defined(CONFIGURE_SHELL_COMMAND_IFCONFIG)
349        &rtems_shell_IFCONFIG_Command,
350      #endif
351
352      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
353           !defined(CONFIGURE_SHELL_NO_COMMAND_ROUTE)) || \
354          defined(CONFIGURE_SHELL_COMMAND_ROUTE)
355        &rtems_shell_ROUTE_Command,
356      #endif
357
358      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
359           !defined(CONFIGURE_SHELL_NO_COMMAND_NETSTATS)) || \
360          defined(CONFIGURE_SHELL_COMMAND_NETSTATS)
361        &rtems_shell_NETSTATS_Command,
362      #endif
363    #endif
364
365    /*
366     *  User defined shell commands
367     */
368    #if defined(CONFIGURE_SHELL_USER_COMMANDS)
369      CONFIGURE_SHELL_USER_COMMANDS,
370    #endif
371    NULL
372  };
373
374  /*
375   * The mount command's support file system types.
376   */
377  #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
378       !defined(CONFIGURE_SHELL_COMMAND_NO_MOUNT)) || \
379       defined(CONFIGURE_SHELL_COMMAND_MOUNT)
380    rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[] = {
381      #if defined(CONFIGURE_SHELL_MOUNT_MSDOS)
382        &rtems_shell_Mount_MSDOS,
383      #endif
384      #if RTEMS_NETWORKING
385        #if defined(CONFIGURE_SHELL_MOUNT_TFTP)
386          &rtems_shell_Mount_TFTP,
387        #endif
388        #if defined(CONFIGURE_SHELL_MOUNT_FTP)
389          &rtems_shell_Mount_FTP,
390        #endif
391        #if defined(CONFIGURE_SHELL_MOUNT_NFS)
392          &rtems_shell_Mount_NFS,
393        #endif
394      #endif
395      NULL
396    };
397  #endif
398
399#endif
400
401#endif
Note: See TracBrowser for help on using the repository browser.