forked from Imagelibrary/rtems
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:
@@ -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>
|
2007-11-29 Chris Johns <chrisj@rtems.org>
|
||||||
|
|
||||||
* iostream/Makefile.am: Change the executable name so it does not
|
* iostream/Makefile.am: Change the executable name so it does not
|
||||||
|
|||||||
@@ -602,3 +602,39 @@ Init (rtems_task_argument ignored)
|
|||||||
|
|
||||||
fileio_menu();
|
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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user