2007-12-11 Joel Sherrill <joel.sherrill@oarcorp.com>

* fileio/init.c: Add RTEMS Shell configuration and static configuration
	of user commands.
This commit is contained in:
Joel Sherrill
2007-12-11 21:33:31 +00:00
parent c748231a9b
commit 4c081a041f
2 changed files with 41 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2007-12-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* fileio/init.c: Add RTEMS Shell configuration and static configuration
of user commands.
2007-11-29 Chris Johns <chrisj@rtems.org>
* iostream/Makefile.am: Change the executable name so it does not

View File

@@ -602,3 +602,39 @@ Init (rtems_task_argument ignored)
fileio_menu();
}
/*
* RTEMS Shell Configuration -- Add a command and an alias for it
*/
int main_usercmd(int argc, char **argv)
{
int i;
printf( "UserCommand: argc=%d\n", argc );
for (i=0 ; i<argc ; i++ )
printf( "argv[%d]= %s\n", i, argv[i] );
return 0;
}
shell_cmd_t Shell_USERCMD_Command = {
"usercmd", /* name */
"usercmd n1 [n2 [n3...]] # echo arguments", /* usage */
"user", /* topic */
main_usercmd, /* command */
NULL, /* alias */
NULL /* next */
};
shell_alias_t Shell_USERECHO_Alias = {
"usercmd", /* command */
"userecho" /* alias */
};
#define CONFIGURE_SHELL_USER_COMMANDS &Shell_USERCMD_Command
#define CONFIGURE_SHELL_USER_ALIASES &Shell_USERECHO_Alias
#define CONFIGURE_SHELL_COMMANDS_INIT
#define CONFIGURE_SHELL_COMMANDS_ALL
#include <rtems/shellconfig.h>