source: rtems/cpukit/libmisc/shell/shellconfig.h @ e4a3d93

4.104.115
Last change on this file since e4a3d93 was e4a3d93, checked in by Chris Johns <chrisj@…>, on 06/12/09 at 05:51:43

2009-06-12 Chris Johns <chrisj@…>

  • libmisc/shell/dd-args.c, libmisc/shell/dd-conv.c, libmisc/shell/dd-conv_tab.c, libmisc/shell/dd-misc.c, libmisc/shell/dd-position.c, libmisc/shell/dd.h, libmisc/shell/extern-dd.h, libmisc/shell/hexdump-conv.c, libmisc/shell/hexdump-display.c, libmisc/shell/hexdump-odsyntax.c, libmisc/shell/hexdump-parse.c, libmisc/shell/hexdump.h, libmisc/shell/hexsyntax.c, libmisc/shell/main_dd.c, libmisc/shell/main_hexdump.c: New.
  • libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add dd and hexdump commands.
  • Property mode set to 100644
File size: 14.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;
56extern rtems_shell_cmd_t rtems_shell_FDISK_Command;
57extern rtems_shell_cmd_t rtems_shell_DD_Command;
58extern rtems_shell_cmd_t rtems_shell_HEXDUMP_Command;
59
60extern rtems_shell_cmd_t rtems_shell_RTC_Command;
61
62extern rtems_shell_cmd_t rtems_shell_HALT_Command;
63extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
64extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
65extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
66extern rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command;
67extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command;
68#if RTEMS_NETWORKING
69  extern rtems_shell_cmd_t rtems_shell_IFCONFIG_Command;
70  extern rtems_shell_cmd_t rtems_shell_ROUTE_Command;
71  extern rtems_shell_cmd_t rtems_shell_NETSTATS_Command;
72#endif
73
74extern rtems_shell_cmd_t *rtems_shell_Initial_commands[];
75
76/*
77 *  Extern for alias commands
78 */
79extern rtems_shell_alias_t rtems_shell_DIR_Alias;
80extern rtems_shell_alias_t rtems_shell_CD_Alias;
81extern rtems_shell_alias_t rtems_shell_EXIT_Alias;
82
83extern rtems_shell_alias_t *rtems_shell_Initial_aliases[];
84
85/*
86 *  Externs for mount command helpers
87 */
88extern rtems_shell_filesystems_t rtems_shell_Mount_MSDOS;
89extern rtems_shell_filesystems_t rtems_shell_Mount_TFTP;
90extern rtems_shell_filesystems_t rtems_shell_Mount_FTP;
91extern rtems_shell_filesystems_t rtems_shell_Mount_NFS;
92
93extern rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[];
94
95/*
96 *  If we are configured to alias a command, then make sure the underlying
97 *  command is configured.
98 */
99
100#if !defined(CONFIGURE_SHELL_COMMANDS_ALL)
101  #if defined(CONFIGURE_SHELL_COMMANDS_DIR) && \
102      !defined(CONFIGURE_SHELL_COMMANDS_LS)
103    #define CONFIGURE_SHELL_COMMAND_LS
104  #endif
105
106  #if defined(CONFIGURE_SHELL_COMMANDS_CD) && \
107      !defined(CONFIGURE_SHELL_COMMANDS_CHDIR)
108    #define CONFIGURE_SHELL_COMMAND_CHDIR
109  #endif
110
111  #if defined(CONFIGURE_SHELL_COMMANDS_EXIT) && \
112      !defined(CONFIGURE_SHELL_COMMANDS_LOGOFF)
113    #define CONFIGURE_SHELL_COMMAND_LOGOFF
114  #endif
115#endif
116
117#if defined(CONFIGURE_SHELL_COMMANDS_INIT)
118  rtems_shell_alias_t *rtems_shell_Initial_aliases[] = {
119    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
120         !defined(CONFIGURE_SHELL_NO_COMMAND_DIR)) || \
121        defined(CONFIGURE_SHELL_COMMAND_DIR)
122      &rtems_shell_DIR_Alias,
123    #endif
124    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
125         !defined(CONFIGURE_SHELL_NO_COMMAND_CD)) || \
126        defined(CONFIGURE_SHELL_COMMAND_CD)
127      &rtems_shell_CD_Alias,
128    #endif
129    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
130         !defined(CONFIGURE_SHELL_NO_COMMAND_EXIT)) || \
131        defined(CONFIGURE_SHELL_COMMAND_EXIT)
132      &rtems_shell_EXIT_Alias,
133    #endif
134
135    /*
136     *  User defined shell aliases
137     */
138    #if defined(CONFIGURE_SHELL_USER_ALIASES)
139      CONFIGURE_SHELL_USER_ALIASES,
140    #endif
141    NULL
142  };
143
144  rtems_shell_cmd_t *rtems_shell_Initial_commands[] = {
145    /*
146     *  General comamnds that should be present
147     */
148    &rtems_shell_HELP_Command,
149    &rtems_shell_ALIAS_Command,
150
151    /*
152     *  Common commands that can be optional
153     */
154    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
155         !defined(CONFIGURE_SHELL_NO_COMMAND_JOEL)) || \
156        defined(CONFIGURE_SHELL_COMMAND_JOEL)
157      &rtems_shell_JOEL_Command,
158    #endif
159    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
160         !defined(CONFIGURE_SHELL_NO_COMMAND_DATE)) || \
161        defined(CONFIGURE_SHELL_COMMAND_DATE)
162      &rtems_shell_DATE_Command,
163    #endif
164    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
165         !defined(CONFIGURE_SHELL_NO_COMMAND_ECHO)) || \
166        defined(CONFIGURE_SHELL_COMMAND_ECHO)
167      &rtems_shell_ECHO_Command,
168    #endif
169    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
170         !defined(CONFIGURE_SHELL_NO_COMMAND_SLEEP)) || \
171        defined(CONFIGURE_SHELL_COMMAND_SLEEP)
172      &rtems_shell_SLEEP_Command,
173    #endif
174    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
175         !defined(CONFIGURE_SHELL_NO_COMMAND_ID)) || \
176        defined(CONFIGURE_SHELL_COMMAND_ID)
177      &rtems_shell_ID_Command,
178    #endif
179    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
180         !defined(CONFIGURE_SHELL_NO_COMMAND_TTY)) || \
181        defined(CONFIGURE_SHELL_COMMAND_TTY)
182      &rtems_shell_TTY_Command,
183    #endif
184    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
185         !defined(CONFIGURE_SHELL_NO_COMMAND_WHOAMI)) || \
186        defined(CONFIGURE_SHELL_COMMAND_WHOAMI)
187      &rtems_shell_WHOAMI_Command,
188    #endif
189    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
190         !defined(CONFIGURE_SHELL_NO_COMMAND_LOGOFF)) || \
191        defined(CONFIGURE_SHELL_COMMAND_LOGOFF)
192      &rtems_shell_LOGOFF_Command,
193    #endif
194
195    /*
196     *  Memory printing/modification family commands
197     */
198    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
199        !defined(CONFIGURE_SHELL_NO_COMMAND_MDUMP)) || \
200        defined(CONFIGURE_SHELL_COMMAND_MDUMP)
201      &rtems_shell_MDUMP_Command,
202    #endif
203    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
204         !defined(CONFIGURE_SHELL_NO_COMMAND_WDUMP)) || \
205        defined(CONFIGURE_SHELL_COMMAND_WDUMP)
206      &rtems_shell_WDUMP_Command,
207    #endif
208    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
209         !defined(CONFIGURE_SHELL_NO_COMMAND_MEDIT)) || \
210        defined(CONFIGURE_SHELL_COMMAND_MEDIT)
211      &rtems_shell_MEDIT_Command,
212    #endif
213    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
214         !defined(CONFIGURE_SHELL_NO_COMMAND_MFILL)) || \
215        defined(CONFIGURE_SHELL_COMMAND_MFILL)
216      &rtems_shell_MFILL_Command,
217    #endif
218    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
219         !defined(CONFIGURE_SHELL_NO_COMMAND_MMOVE)) || \
220        defined(CONFIGURE_SHELL_COMMAND_MMOVE)
221      &rtems_shell_MMOVE_Command,
222    #endif
223
224    /*
225     *  File and directory commands
226     */
227    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
228         !defined(CONFIGURE_SHELL_NO_COMMAND_CP)) || \
229        defined(CONFIGURE_SHELL_COMMAND_CP)
230      &rtems_shell_CP_Command,
231    #endif
232    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
233         !defined(CONFIGURE_SHELL_NO_COMMAND_PWD)) || \
234        defined(CONFIGURE_SHELL_COMMAND_PWD)
235      &rtems_shell_PWD_Command,
236    #endif
237    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
238         !defined(CONFIGURE_SHELL_NO_COMMAND_LS)) || \
239        defined(CONFIGURE_SHELL_COMMAND_LS)
240      &rtems_shell_LS_Command,
241    #endif
242    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
243         !defined(CONFIGURE_SHELL_NO_COMMAND_CHDIR)) || \
244        defined(CONFIGURE_SHELL_COMMAND_CHDIR)
245      &rtems_shell_CHDIR_Command,
246    #endif
247    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
248         !defined(CONFIGURE_SHELL_NO_COMMAND_MKDIR)) || \
249        defined(CONFIGURE_SHELL_COMMAND_MKDIR)
250      &rtems_shell_MKDIR_Command,
251    #endif
252    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
253         !defined(CONFIGURE_SHELL_NO_COMMAND_RMDIR)) || \
254        defined(CONFIGURE_SHELL_COMMAND_RMDIR)
255      &rtems_shell_RMDIR_Command,
256    #endif
257    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
258         !defined(CONFIGURE_SHELL_NO_COMMAND_CHROOT)) || \
259        defined(CONFIGURE_SHELL_COMMAND_CHROOT)
260      &rtems_shell_CHROOT_Command,
261    #endif
262    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
263         !defined(CONFIGURE_SHELL_NO_COMMAND_CHMOD)) || \
264        defined(CONFIGURE_SHELL_COMMAND_CHMOD)
265      &rtems_shell_CHMOD_Command,
266    #endif
267    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
268         !defined(CONFIGURE_SHELL_NO_COMMAND_CAT)) || \
269        defined(CONFIGURE_SHELL_COMMAND_CAT)
270      &rtems_shell_CAT_Command,
271    #endif
272    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
273         !defined(CONFIGURE_SHELL_NO_COMMAND_MSDOSFMT)) || \
274        defined(CONFIGURE_SHELL_COMMAND_MSDOSFMT)
275      &rtems_shell_MSDOSFMT_Command,
276    #endif
277    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
278         !defined(CONFIGURE_SHELL_NO_COMMAND_MV)) || \
279        defined(CONFIGURE_SHELL_COMMAND_MV)
280      &rtems_shell_MV_Command,
281    #endif
282    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
283         !defined(CONFIGURE_SHELL_NO_COMMAND_RM)) || \
284        defined(CONFIGURE_SHELL_COMMAND_RM)
285      &rtems_shell_RM_Command,
286    #endif
287    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
288         !defined(CONFIGURE_SHELL_NO_COMMAND_UMASK)) || \
289        defined(CONFIGURE_SHELL_COMMAND_UMASK)
290      &rtems_shell_UMASK_Command,
291    #endif
292    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
293         !defined(CONFIGURE_SHELL_NO_COMMAND_MOUNT)) || \
294        defined(CONFIGURE_SHELL_COMMAND_MOUNT)
295      &rtems_shell_MOUNT_Command,
296    #endif
297    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
298         !defined(CONFIGURE_SHELL_NO_COMMAND_UNMOUNT)) || \
299        defined(CONFIGURE_SHELL_COMMAND_UNMOUNT)
300      &rtems_shell_UNMOUNT_Command,
301    #endif
302    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
303         !defined(CONFIGURE_SHELL_NO_COMMAND_BLKSYNC)) || \
304        defined(CONFIGURE_SHELL_COMMAND_BLKSYNC)
305      &rtems_shell_BLKSYNC_Command,
306    #endif
307    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
308         !defined(CONFIGURE_SHELL_NO_COMMAND_FDISK)) || \
309        defined(CONFIGURE_SHELL_COMMAND_FDISK)
310      &rtems_shell_FDISK_Command,
311    #endif
312    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
313         !defined(CONFIGURE_SHELL_NO_COMMAND_DD)) || \
314        defined(CONFIGURE_SHELL_COMMAND_DD)
315      &rtems_shell_DD_Command,
316    #endif
317    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
318         !defined(CONFIGURE_SHELL_NO_COMMAND_HEXDUMP)) || \
319        defined(CONFIGURE_SHELL_COMMAND_HEXDUMP)
320      &rtems_shell_HEXDUMP_Command,
321    #endif
322
323    /*
324     *  RTEMS Related commands
325     */
326    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
327         !defined(CONFIGURE_SHELL_NO_COMMAND_HALT)) || \
328        defined(CONFIGURE_SHELL_COMMAND_HALT)
329      &rtems_shell_HALT_Command,
330    #endif
331    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
332         !defined(CONFIGURE_SHELL_NO_COMMAND_CPUUSE)) || \
333        defined(CONFIGURE_SHELL_COMMAND_CPUUSE)
334      &rtems_shell_CPUUSE_Command,
335    #endif
336    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
337         !defined(CONFIGURE_SHELL_NO_COMMAND_STACKUSE)) || \
338        defined(CONFIGURE_SHELL_COMMAND_STACKUSE)
339      &rtems_shell_STACKUSE_Command,
340    #endif
341    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
342         !defined(CONFIGURE_SHELL_NO_COMMAND_PERIODUSE)) || \
343        defined(CONFIGURE_SHELL_COMMAND_PERIODUSE)
344      &rtems_shell_PERIODUSE_Command,
345    #endif
346    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
347         !defined(CONFIGURE_SHELL_NO_COMMAND_WKSPACE_INFO)) || \
348        defined(CONFIGURE_SHELL_COMMAND_WKSPACE_INFO)
349      &rtems_shell_WKSPACE_INFO_Command,
350    #endif
351
352
353    /*
354     *  Malloc family commands
355     */
356    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
357         !defined(CONFIGURE_SHELL_NO_COMMAND_MALLOC_INFO)) || \
358        defined(CONFIGURE_SHELL_COMMAND_MALLOC_INFO)
359      &rtems_shell_MALLOC_INFO_Command,
360    #endif
361
362    /*
363     *  Network related commands
364     */
365    #if RTEMS_NETWORKING
366      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
367           !defined(CONFIGURE_SHELL_NO_COMMAND_IFCONFIG)) || \
368          defined(CONFIGURE_SHELL_COMMAND_IFCONFIG)
369        &rtems_shell_IFCONFIG_Command,
370      #endif
371
372      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
373           !defined(CONFIGURE_SHELL_NO_COMMAND_ROUTE)) || \
374          defined(CONFIGURE_SHELL_COMMAND_ROUTE)
375        &rtems_shell_ROUTE_Command,
376      #endif
377
378      #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \
379           !defined(CONFIGURE_SHELL_NO_COMMAND_NETSTATS)) || \
380          defined(CONFIGURE_SHELL_COMMAND_NETSTATS)
381        &rtems_shell_NETSTATS_Command,
382      #endif
383    #endif
384
385    /* Miscanellous shell commands */
386    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) \
387          && !defined(CONFIGURE_SHELL_NO_COMMAND_RTC)) \
388        || defined(CONFIGURE_SHELL_COMMAND_RTC)
389      &rtems_shell_RTC_Command,
390    #endif
391
392    /*
393     *  User defined shell commands
394     */
395    #if defined(CONFIGURE_SHELL_USER_COMMANDS)
396      CONFIGURE_SHELL_USER_COMMANDS,
397    #endif
398    NULL
399  };
400
401  /*
402   * The mount command's support file system types.
403   */
404  #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
405       !defined(CONFIGURE_SHELL_COMMAND_NO_MOUNT)) || \
406       defined(CONFIGURE_SHELL_COMMAND_MOUNT)
407    rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[] = {
408      #if defined(CONFIGURE_SHELL_MOUNT_MSDOS)
409        &rtems_shell_Mount_MSDOS,
410      #endif
411      #if RTEMS_NETWORKING
412        #if defined(CONFIGURE_SHELL_MOUNT_TFTP)
413          &rtems_shell_Mount_TFTP,
414        #endif
415        #if defined(CONFIGURE_SHELL_MOUNT_FTP)
416          &rtems_shell_Mount_FTP,
417        #endif
418        #if defined(CONFIGURE_SHELL_MOUNT_NFS)
419          &rtems_shell_Mount_NFS,
420        #endif
421      #endif
422      NULL
423    };
424  #endif
425
426#endif
427
428#endif
Note: See TracBrowser for help on using the repository browser.