diff options
Diffstat (limited to 'cpukit/libmisc/shell')
-rw-r--r-- | cpukit/libmisc/shell/shell.h | 385 | ||||
-rw-r--r-- | cpukit/libmisc/shell/shellconfig.h | 554 |
2 files changed, 0 insertions, 939 deletions
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h deleted file mode 100644 index 98ddf0a958..0000000000 --- a/cpukit/libmisc/shell/shell.h +++ /dev/null @@ -1,385 +0,0 @@ -/** - * @file rtems/shell.h - * - * @brief Instantatiate a New Terminal Shell - */ - -/* - * Author: - * - * WORK: fernando.ruiz@ctv.es - * HOME: correo@fernando-ruiz.com - * - * Thanks at: - * Chris Johns - */ - -#ifndef __RTEMS_SHELL_H__ -#define __RTEMS_SHELL_H__ - -#include <sys/types.h> -#include <sys/stat.h> -#include <rtems.h> -#include <stdio.h> -#include <termios.h> -#include <rtems/fs.h> -#include <rtems/libio.h> -#include <rtems/chain.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Some key labels to define special keys. - */ - -#define RTEMS_SHELL_KEYS_EXTENDED (0x8000) -#define RTEMS_SHELL_KEYS_NORMAL_MASK (0x00ff) -#define RTEMS_SHELL_KEYS_INS (0) -#define RTEMS_SHELL_KEYS_DEL (1) -#define RTEMS_SHELL_KEYS_UARROW (2) -#define RTEMS_SHELL_KEYS_DARROW (3) -#define RTEMS_SHELL_KEYS_LARROW (4) -#define RTEMS_SHELL_KEYS_RARROW (5) -#define RTEMS_SHELL_KEYS_HOME (6) -#define RTEMS_SHELL_KEYS_END (7) -#define RTEMS_SHELL_KEYS_F1 (8) -#define RTEMS_SHELL_KEYS_F2 (9) -#define RTEMS_SHELL_KEYS_F3 (10) -#define RTEMS_SHELL_KEYS_F4 (11) -#define RTEMS_SHELL_KEYS_F5 (12) -#define RTEMS_SHELL_KEYS_F6 (13) -#define RTEMS_SHELL_KEYS_F7 (14) -#define RTEMS_SHELL_KEYS_F8 (15) -#define RTEMS_SHELL_KEYS_F9 (16) -#define RTEMS_SHELL_KEYS_F10 (17) - -typedef bool (*rtems_shell_login_check_t)( - const char * /* user */, - const char * /* passphrase */ -); - -extern bool rtems_shell_login_prompt( - FILE *in, - FILE *out, - const char *device, - rtems_shell_login_check_t check -); - -extern bool rtems_shell_login_check( - const char *user, - const char *passphrase -); - -typedef int (*rtems_shell_command_t)(int argc, char **argv); - -struct rtems_shell_cmd_tt; -typedef struct rtems_shell_cmd_tt rtems_shell_cmd_t; - -struct rtems_shell_cmd_tt { - const char *name; - const char *usage; - const char *topic; - rtems_shell_command_t command; - rtems_shell_cmd_t *alias; - rtems_shell_cmd_t *next; - mode_t mode; - uid_t uid; - gid_t gid; -}; - -typedef struct { - const char *name; - const char *alias; -} rtems_shell_alias_t; - -struct rtems_shell_topic_tt; -typedef struct rtems_shell_topic_tt rtems_shell_topic_t; - -struct rtems_shell_topic_tt { - const char *topic; - rtems_shell_topic_t *next; -}; - -/* - * The return value has RTEMS_SHELL_KEYS_EXTENDED set if the key - * is extended, ie a special key. - */ -extern unsigned int rtems_shell_getchar(FILE *in); - -extern rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd); - -extern rtems_shell_cmd_t *rtems_shell_add_cmd_struct( - rtems_shell_cmd_t *shell_cmd -); - -rtems_shell_cmd_t * rtems_shell_add_cmd( - const char *cmd, - const char *topic, - const char *usage, - rtems_shell_command_t command -); - -extern rtems_shell_cmd_t * rtems_shell_alias_cmd( - const char *cmd, - const char *alias -); - -extern int rtems_shell_make_args( - char *commandLine, - int *argc_p, - char **argv_p, - int max_args -); - -extern rtems_shell_topic_t * rtems_shell_lookup_topic( - const char *topic -); - -extern bool rtems_shell_can_see_cmd( - const rtems_shell_cmd_t *shell_cmd -); - -extern int rtems_shell_execute_cmd( - const char *cmd, int argc, char *argv[] -); - -/* - * Call to set up the shell environment if you need to execute commands before - * running a shell. - */ -extern void rtems_shell_init_environment( - void -); - -extern int rtems_shell_cat_file( - FILE *out, - const char *name -); - -extern void rtems_shell_write_file( - const char *name, - const char *content -); - -extern int rtems_shell_script_file( - int argc, - char **argv -); - -/** - * Initialise the shell creating tasks to login and run the shell - * sessions. - * - * @param task_name Name of the shell task. - * @param task_stacksize The size of the stack. If 0 the default size is used. - * @param task_priority The priority the shell runs at. - * @param forever Repeat logins. - * @param wait Caller should block until shell exits. - * @param login_check User login check function, NULL disables login checks. - * - */ -extern rtems_status_code rtems_shell_init( - const char *task_name, - size_t task_stacksize, - rtems_task_priority task_priority, - const char *devname, - bool forever, - bool wait, - rtems_shell_login_check_t login_check -); - -/** - * Run a shell script creating a shell tasks to execute the command under. - * - * @param task_name Name of the shell task. - * @param task_stacksize The size of the stack. If 0 the default size is used. - * @param task_priority The priority the shell runs at. - * @param input The file of commands. Can be 'stdin' to use stdin. - * @param output The output file to write commands to. Can be 'stdout', - * 'stderr' or '/dev/null'. - * @param output_append Append the output to the file or truncate the file. - * Create if it does not exist. - * @param wait Wait for the script to finish. - */ -extern rtems_status_code rtems_shell_script( - const char *task_name, - size_t task_stacksize, /* 0 default*/ - rtems_task_priority task_priority, - const char *input, - const char *output, - bool output_append, - bool wait, - bool echo -); - -/** - * Private environment associated with each shell instance. - */ -typedef struct { - /** 'S','E','N','V': Shell Environment */ - rtems_name magic; - const char *devname; - const char *taskname; - bool exit_shell; /* logout */ - bool forever; /* repeat login */ - int errorlevel; - bool echo; - char cwd[256]; - const char *input; - const char *output; - bool output_append; - rtems_id wake_on_end; - rtems_shell_login_check_t login_check; - - /** - * @brief The real and effective UID of the shell task in case no login check - * is present. - */ - uid_t uid; - - /** - * @brief The real and effective GID of the shell task in case no login check - * is present. - */ - gid_t gid; -} rtems_shell_env_t; - -bool rtems_shell_main_loop( - rtems_shell_env_t *rtems_shell_env -); - -extern const rtems_shell_env_t rtems_global_shell_env; - -rtems_shell_env_t *rtems_shell_get_current_env(void); -void rtems_shell_dup_current_env(rtems_shell_env_t *); - -/* - * The types of file systems we can mount. We have them broken out - * out like this so they can be configured by shellconfig.h. The - * mount command needs special treatment due to some file systems - * being dependent on the network stack and some not. If we had - * all possible file systems being included it would force the - * networking stack into the applcation and this may not be - * required. - */ -struct rtems_shell_filesystems_tt; -typedef struct rtems_shell_filesystems_tt rtems_shell_filesystems_t; - -typedef int (*rtems_shell_filesystems_mounter_t)( - const char* driver, - const char* path, - rtems_shell_filesystems_t* fs, - rtems_filesystem_options_t options -); - -struct rtems_shell_filesystems_tt { - rtems_chain_node link; - const char *name; - int driver_needed; - const rtems_filesystem_operations_table *fs_ops; - rtems_shell_filesystems_mounter_t mounter; -}; - -/** - * This method dynamically builds the command line prompt string - * and places it in @a prompt. - * - * @param[in] shell_env is the shell execution environment - * @param[in] prompt is a pointer to a string buffer area - * @param[in] size is length of the prompt buffer area - * - * @return This method fills in the memory pointed to by @a prompt. - * - * @note An application specific implementation can be provided - * by the user. - */ -extern void rtems_shell_get_prompt( - rtems_shell_env_t *shell_env, - char *prompt, - size_t size -); - -/** - * Helper for the mount command. - * - * @param[in] driver The path to the driver. - * @param[in] path The path to mount on. - * @param[in] fs The file system definition. - * @param[in] options Special file system options. - */ -extern int rtems_shell_libc_mounter( - const char* driver, - const char* path, - rtems_shell_filesystems_t* fs, - rtems_filesystem_options_t options -); - -/** - * Add a new file system mount configuration to the mount command. - * - * @param[in] fs The file system mount data. - */ -extern void rtems_shell_mount_add_fsys(rtems_shell_filesystems_t* fs); - -/** - * Delete file system mount configuration from the mount command. - * - * @param[in] fs The file system mount data to remove. - */ -extern void rtems_shell_mount_del_fsys(rtems_shell_filesystems_t* fs); - -typedef void (*rtems_shell_wait_for_input_notification)( - int fd, - int seconds_remaining, - void *arg -); - -/** - * @brief Waits for input. - * - * @retval RTEMS_SUCCESSFUL Input detected. - * @retval RTEMS_TIMEOUT Timeout expired. - * @retval RTEMS_UNSATISFIED Cannot change or restore termios attributes. - */ -extern rtems_status_code rtems_shell_wait_for_input( - int fd, - int timeout_in_seconds, - rtems_shell_wait_for_input_notification notification, - void *notification_arg -); - -/** - * @brief Waits for explicit input. - * - * @param desired_input An explicit unsigned character to wait for or -1 to - * accept any input. - * - * @retval RTEMS_SUCCESSFUL Input detected. - * @retval RTEMS_TIMEOUT Timeout expired. - * @retval RTEMS_UNSATISFIED Cannot change or restore termios attributes. - */ -extern rtems_status_code rtems_shell_wait_for_explicit_input( - int fd, - int timeout_in_seconds, - rtems_shell_wait_for_input_notification notification, - void *notification_arg, - int desired_input -); - -extern int rtems_shell_main_monitor(int argc, char **argv); - -/* - * Provide these commands for application use, as their implementation - * is tedious. - */ -int rtems_shell_main_mv(int argc, char *argv[]); -int rtems_shell_main_cp(int argc, char *argv[]); -int rtems_shell_main_rm(int argc, char *argv[]); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cpukit/libmisc/shell/shellconfig.h b/cpukit/libmisc/shell/shellconfig.h deleted file mode 100644 index 9f68b313fb..0000000000 --- a/cpukit/libmisc/shell/shellconfig.h +++ /dev/null @@ -1,554 +0,0 @@ -/** - * @file rtems/shellconfig.h - * - * RTEMS Shell Command Set Configuration - */ - -/* - * COPYRIGHT (c) 1989-2012. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_SHELL_CONFIG_h -#define _RTEMS_SHELL_CONFIG_h - -#include <rtems/shell.h> - -/* - * Externs for all command definition structures - */ -extern rtems_shell_cmd_t rtems_shell_HELP_Command; -extern rtems_shell_cmd_t rtems_shell_ALIAS_Command; -extern rtems_shell_cmd_t rtems_shell_TIME_Command; -extern rtems_shell_cmd_t rtems_shell_CMDLS_Command; -extern rtems_shell_cmd_t rtems_shell_CMDCHOWN_Command; -extern rtems_shell_cmd_t rtems_shell_CMDCHMOD_Command; -extern rtems_shell_cmd_t rtems_shell_LOGOFF_Command; -extern rtems_shell_cmd_t rtems_shell_SETENV_Command; -extern rtems_shell_cmd_t rtems_shell_GETENV_Command; -extern rtems_shell_cmd_t rtems_shell_UNSETENV_Command; - -extern rtems_shell_cmd_t rtems_shell_MDUMP_Command; -extern rtems_shell_cmd_t rtems_shell_WDUMP_Command; -extern rtems_shell_cmd_t rtems_shell_LDUMP_Command; -extern rtems_shell_cmd_t rtems_shell_MEDIT_Command; -extern rtems_shell_cmd_t rtems_shell_MFILL_Command; -extern rtems_shell_cmd_t rtems_shell_MMOVE_Command; - -extern rtems_shell_cmd_t rtems_shell_JOEL_Command; -extern rtems_shell_cmd_t rtems_shell_DATE_Command; -extern rtems_shell_cmd_t rtems_shell_ECHO_Command; -extern rtems_shell_cmd_t rtems_shell_EDIT_Command; -extern rtems_shell_cmd_t rtems_shell_SLEEP_Command; -extern rtems_shell_cmd_t rtems_shell_ID_Command; -extern rtems_shell_cmd_t rtems_shell_TTY_Command; -extern rtems_shell_cmd_t rtems_shell_WHOAMI_Command; - -extern rtems_shell_cmd_t rtems_shell_CP_Command; -extern rtems_shell_cmd_t rtems_shell_PWD_Command; -extern rtems_shell_cmd_t rtems_shell_LS_Command; -extern rtems_shell_cmd_t rtems_shell_CHDIR_Command; -extern rtems_shell_cmd_t rtems_shell_MKDIR_Command; -extern rtems_shell_cmd_t rtems_shell_RMDIR_Command; -extern rtems_shell_cmd_t rtems_shell_CHROOT_Command; -extern rtems_shell_cmd_t rtems_shell_CHMOD_Command; -extern rtems_shell_cmd_t rtems_shell_CAT_Command; -extern rtems_shell_cmd_t rtems_shell_MKRFS_Command; -extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Command; -extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Alias; -extern rtems_shell_cmd_t rtems_shell_MV_Command; -extern rtems_shell_cmd_t rtems_shell_RM_Command; -extern rtems_shell_cmd_t rtems_shell_LN_Command; -extern rtems_shell_cmd_t rtems_shell_MKNOD_Command; -extern rtems_shell_cmd_t rtems_shell_UMASK_Command; -extern rtems_shell_cmd_t rtems_shell_LSOF_Command; -extern rtems_shell_cmd_t rtems_shell_MOUNT_Command; -extern rtems_shell_cmd_t rtems_shell_UNMOUNT_Command; -extern rtems_shell_cmd_t rtems_shell_BLKSYNC_Command; -extern rtems_shell_cmd_t rtems_shell_BLKSTATS_Command; -extern rtems_shell_cmd_t rtems_shell_FDISK_Command; -extern rtems_shell_cmd_t rtems_shell_DD_Command; -extern rtems_shell_cmd_t rtems_shell_HEXDUMP_Command; -extern rtems_shell_cmd_t rtems_shell_DEBUGRFS_Command; -extern rtems_shell_cmd_t rtems_shell_DF_Command; -extern rtems_shell_cmd_t rtems_shell_MD5_Command; - -extern rtems_shell_cmd_t rtems_shell_RTC_Command; - -extern rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command; -extern rtems_shell_cmd_t rtems_shell_CPUINFO_Command; -extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command; -extern rtems_shell_cmd_t rtems_shell_TOP_Command; -extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command; -extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command; -extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command; -extern rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command; -extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command; -extern rtems_shell_cmd_t rtems_shell_RTRACE_Command; -#if RTEMS_NETWORKING - extern rtems_shell_cmd_t rtems_shell_IFCONFIG_Command; - extern rtems_shell_cmd_t rtems_shell_ROUTE_Command; - extern rtems_shell_cmd_t rtems_shell_NETSTATS_Command; - extern rtems_shell_cmd_t rtems_shell_PING_Command; -#endif - -/* - * Extern for System commands - */ -extern rtems_shell_cmd_t rtems_shell_DRVMGR_Command; -extern rtems_shell_cmd_t rtems_shell_PCI_Command; - -extern rtems_shell_cmd_t * const rtems_shell_Initial_commands[]; - -/* - * Extern for alias commands - */ -extern rtems_shell_alias_t rtems_shell_DIR_Alias; -extern rtems_shell_alias_t rtems_shell_CD_Alias; -extern rtems_shell_alias_t rtems_shell_EXIT_Alias; - -extern rtems_shell_alias_t * const rtems_shell_Initial_aliases[]; - -/* - * If we are configured to alias a command, then make sure the underlying - * command is configured. - */ - -#if !defined(CONFIGURE_SHELL_COMMANDS_ALL) - #if defined(CONFIGURE_SHELL_COMMANDS_DIR) && \ - !defined(CONFIGURE_SHELL_COMMANDS_LS) - #define CONFIGURE_SHELL_COMMAND_LS - #endif - - #if defined(CONFIGURE_SHELL_COMMANDS_CD) && \ - !defined(CONFIGURE_SHELL_COMMANDS_CHDIR) - #define CONFIGURE_SHELL_COMMAND_CHDIR - #endif - - #if defined(CONFIGURE_SHELL_COMMANDS_EXIT) && \ - !defined(CONFIGURE_SHELL_COMMANDS_LOGOFF) - #define CONFIGURE_SHELL_COMMAND_LOGOFF - #endif -#endif - -#if defined(CONFIGURE_SHELL_COMMANDS_INIT) - rtems_shell_alias_t * const rtems_shell_Initial_aliases[] = { - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DIR)) || \ - defined(CONFIGURE_SHELL_COMMAND_DIR) - &rtems_shell_DIR_Alias, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CD)) || \ - defined(CONFIGURE_SHELL_COMMAND_CD) - &rtems_shell_CD_Alias, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_EXIT)) || \ - defined(CONFIGURE_SHELL_COMMAND_EXIT) - &rtems_shell_EXIT_Alias, - #endif - - /* - * User defined shell aliases - */ - #if defined(CONFIGURE_SHELL_USER_ALIASES) - CONFIGURE_SHELL_USER_ALIASES, - #endif - NULL - }; - - rtems_shell_cmd_t * const rtems_shell_Initial_commands[] = { - /* - * General comamnds that should be present - */ - &rtems_shell_HELP_Command, - &rtems_shell_ALIAS_Command, - &rtems_shell_TIME_Command, - - /* - * Common commands that can be optional - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CMDLS)) || \ - defined(CONFIGURE_SHELL_COMMAND_CMDLS) - &rtems_shell_CMDLS_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CMDCHOWN)) || \ - defined(CONFIGURE_SHELL_COMMAND_CMDCHOWN) - &rtems_shell_CMDCHOWN_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CMDCHMOD)) || \ - defined(CONFIGURE_SHELL_COMMAND_CMDCHMOD) - &rtems_shell_CMDCHMOD_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_JOEL)) || \ - defined(CONFIGURE_SHELL_COMMAND_JOEL) - &rtems_shell_JOEL_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DATE)) || \ - defined(CONFIGURE_SHELL_COMMAND_DATE) - &rtems_shell_DATE_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_ECHO)) || \ - defined(CONFIGURE_SHELL_COMMAND_ECHO) - &rtems_shell_ECHO_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_EDIT)) || \ - defined(CONFIGURE_SHELL_COMMAND_EDIT) - &rtems_shell_EDIT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_SLEEP)) || \ - defined(CONFIGURE_SHELL_COMMAND_SLEEP) - &rtems_shell_SLEEP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_ID)) || \ - defined(CONFIGURE_SHELL_COMMAND_ID) - &rtems_shell_ID_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_TTY)) || \ - defined(CONFIGURE_SHELL_COMMAND_TTY) - &rtems_shell_TTY_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_WHOAMI)) || \ - defined(CONFIGURE_SHELL_COMMAND_WHOAMI) - &rtems_shell_WHOAMI_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_LOGOFF)) || \ - defined(CONFIGURE_SHELL_COMMAND_LOGOFF) - &rtems_shell_LOGOFF_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_SETENV)) || \ - defined(CONFIGURE_SHELL_COMMAND_SETENV) - &rtems_shell_SETENV_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_GETENV)) || \ - defined(CONFIGURE_SHELL_COMMAND_GETENV) - &rtems_shell_GETENV_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CRLENV)) || \ - defined(CONFIGURE_SHELL_COMMAND_UNSETENV) - &rtems_shell_UNSETENV_Command, - #endif - - /* - * Memory printing/modification family commands - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MDUMP)) || \ - defined(CONFIGURE_SHELL_COMMAND_MDUMP) - &rtems_shell_MDUMP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_WDUMP)) || \ - defined(CONFIGURE_SHELL_COMMAND_WDUMP) - &rtems_shell_WDUMP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_LDUMP)) || \ - defined(CONFIGURE_SHELL_COMMAND_LDUMP) - &rtems_shell_LDUMP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MEDIT)) || \ - defined(CONFIGURE_SHELL_COMMAND_MEDIT) - &rtems_shell_MEDIT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MFILL)) || \ - defined(CONFIGURE_SHELL_COMMAND_MFILL) - &rtems_shell_MFILL_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MMOVE)) || \ - defined(CONFIGURE_SHELL_COMMAND_MMOVE) - &rtems_shell_MMOVE_Command, - #endif - - /* - * File and directory commands - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CP)) || \ - defined(CONFIGURE_SHELL_COMMAND_CP) - &rtems_shell_CP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_PWD)) || \ - defined(CONFIGURE_SHELL_COMMAND_PWD) - &rtems_shell_PWD_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_LS)) || \ - defined(CONFIGURE_SHELL_COMMAND_LS) - &rtems_shell_LS_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CHDIR)) || \ - defined(CONFIGURE_SHELL_COMMAND_CHDIR) - &rtems_shell_CHDIR_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MKDIR)) || \ - defined(CONFIGURE_SHELL_COMMAND_MKDIR) - &rtems_shell_MKDIR_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_RMDIR)) || \ - defined(CONFIGURE_SHELL_COMMAND_RMDIR) - &rtems_shell_RMDIR_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CHROOT)) || \ - defined(CONFIGURE_SHELL_COMMAND_CHROOT) - &rtems_shell_CHROOT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CHMOD)) || \ - defined(CONFIGURE_SHELL_COMMAND_CHMOD) - &rtems_shell_CHMOD_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CAT)) || \ - defined(CONFIGURE_SHELL_COMMAND_CAT) - &rtems_shell_CAT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MKRFS)) || \ - defined(CONFIGURE_SHELL_COMMAND_MKRFS) - &rtems_shell_MKRFS_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MSDOSFMT)) || \ - defined(CONFIGURE_SHELL_COMMAND_MSDOSFMT) - &rtems_shell_MSDOSFMT_Command, - &rtems_shell_MSDOSFMT_Alias, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MV)) || \ - defined(CONFIGURE_SHELL_COMMAND_MV) - &rtems_shell_MV_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_RM)) || \ - defined(CONFIGURE_SHELL_COMMAND_RM) - &rtems_shell_RM_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_LN)) || \ - defined(CONFIGURE_SHELL_COMMAND_LN) - &rtems_shell_LN_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MKNOD)) || \ - defined(CONFIGURE_SHELL_COMMAND_MKNOD) - &rtems_shell_MKNOD_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_UMASK)) || \ - defined(CONFIGURE_SHELL_COMMAND_UMASK) - &rtems_shell_UMASK_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_LSOF)) || \ - defined(CONFIGURE_SHELL_COMMAND_LSOF) - &rtems_shell_LSOF_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MOUNT)) || \ - defined(CONFIGURE_SHELL_COMMAND_MOUNT) - &rtems_shell_MOUNT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_UNMOUNT)) || \ - defined(CONFIGURE_SHELL_COMMAND_UNMOUNT) - &rtems_shell_UNMOUNT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_BLKSYNC)) || \ - defined(CONFIGURE_SHELL_COMMAND_BLKSYNC) - &rtems_shell_BLKSYNC_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_BLKSTATS)) || \ - defined(CONFIGURE_SHELL_COMMAND_BLKSTATS) - &rtems_shell_BLKSTATS_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_FDISK)) || \ - defined(CONFIGURE_SHELL_COMMAND_FDISK) - &rtems_shell_FDISK_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DD)) || \ - defined(CONFIGURE_SHELL_COMMAND_DD) - &rtems_shell_DD_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_HEXDUMP)) || \ - defined(CONFIGURE_SHELL_COMMAND_HEXDUMP) - &rtems_shell_HEXDUMP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DEBUGRFS)) || \ - defined(CONFIGURE_SHELL_COMMAND_DEBUGRFS) - &rtems_shell_DEBUGRFS_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DF)) || \ - defined(CONFIGURE_SHELL_COMMAND_DF) - &rtems_shell_DF_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MD5)) || \ - defined(CONFIGURE_SHELL_COMMAND_MD5) - &rtems_shell_MD5_Command, - #endif - - /* - * RTEMS Related commands - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN)) || \ - defined(CONFIGURE_SHELL_COMMAND_SHUTDOWN) - &rtems_shell_SHUTDOWN_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CPUINFO)) || \ - defined(CONFIGURE_SHELL_COMMAND_CPUINFO) - &rtems_shell_CPUINFO_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_CPUUSE)) || \ - defined(CONFIGURE_SHELL_COMMAND_CPUUSE) - &rtems_shell_CPUUSE_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_TOP)) || \ - defined(CONFIGURE_SHELL_COMMAND_TOP) - &rtems_shell_TOP_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_STACKUSE)) || \ - defined(CONFIGURE_SHELL_COMMAND_STACKUSE) - &rtems_shell_STACKUSE_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_PERIODUSE)) || \ - defined(CONFIGURE_SHELL_COMMAND_PERIODUSE) - &rtems_shell_PERIODUSE_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_PROFREPORT)) || \ - defined(CONFIGURE_SHELL_COMMAND_PROFREPORT) - &rtems_shell_PROFREPORT_Command, - #endif - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_WKSPACE_INFO)) || \ - defined(CONFIGURE_SHELL_COMMAND_WKSPACE_INFO) - &rtems_shell_WKSPACE_INFO_Command, - #endif - - /* - * Malloc family commands - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_MALLOC_INFO)) || \ - defined(CONFIGURE_SHELL_COMMAND_MALLOC_INFO) - &rtems_shell_MALLOC_INFO_Command, - #endif - - /* - * Tracing family commands - */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_RTRACE)) || \ - defined(CONFIGURE_SHELL_COMMAND_RTRACE) - &rtems_shell_RTRACE_Command, - #endif - - /* - * Network related commands - */ - #if RTEMS_NETWORKING - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_IFCONFIG)) || \ - defined(CONFIGURE_SHELL_COMMAND_IFCONFIG) - &rtems_shell_IFCONFIG_Command, - #endif - - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_ROUTE)) || \ - defined(CONFIGURE_SHELL_COMMAND_ROUTE) - &rtems_shell_ROUTE_Command, - #endif - - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_NETSTATS)) || \ - defined(CONFIGURE_SHELL_COMMAND_NETSTATS) - &rtems_shell_NETSTATS_Command, - #endif - - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL_NETWORKING) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_PING)) || \ - defined(CONFIGURE_SHELL_COMMAND_PING) - &rtems_shell_PING_Command, - #endif - #endif - - /* Miscanellous shell commands */ - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) \ - && !defined(CONFIGURE_SHELL_NO_COMMAND_RTC)) \ - || defined(CONFIGURE_SHELL_COMMAND_RTC) - &rtems_shell_RTC_Command, - #endif - - /* - * System related commands - */ - #if defined(RTEMS_DRVMGR_STARTUP) || defined(CONFIGURE_SHELL_COMMAND_DRVMGR) - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_DRVMGR)) || \ - defined(CONFIGURE_SHELL_COMMAND_DRVMGR) - &rtems_shell_DRVMGR_Command, - #endif - #endif - - #if defined(RTEMS_PCI_CONFIG_LIB) - #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \ - !defined(CONFIGURE_SHELL_NO_COMMAND_PCI)) || \ - defined(CONFIGURE_SHELL_COMMAND_PCI) - &rtems_shell_PCI_Command, - #endif - #endif - - /* - * User defined shell commands - */ - #if defined(CONFIGURE_SHELL_USER_COMMANDS) - CONFIGURE_SHELL_USER_COMMANDS, - #endif - NULL - }; - -#endif - -#endif |