From 1ff9922df0f6e5f129299847d0f5eccbc8d6806c Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 22 Dec 2007 08:27:18 +0000 Subject: 2007-12-22 Chris Johns * configure.ac: fixed bug that always enabled strict order mutexes. * score/inline/rtems/score/coremutex.inl: Fixed coding standard. * score/src/coremutex.c: Add the holder's thread to the lock_mutex list if the mutex is initialised locked. * libnetworking/rtems/rtems_glue.c: Changed semaphore error message to show the error is an rtems-net error. * libmisc/monitor/mon-network.c: Removed warnings. * telnetd/icmds.c: Changed shell_* to rtems_shell_*. * score/Makefile.am: Fixed typo that stopped 'make tags' working. * libmisc/shell/err.c, libmisc/shell/err.h, libmisc/shell/errx.c, libmisc/shell/extern-cp.h, libmisc/shell/fts.c, libmisc/shell/fts.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c, libmisc/shell/verr.c, libmisc/shell/verrx.c, libmisc/shell/vwarn.c, libmisc/shell/vwarnx.c, libmisc/shell/warn.c, libmisc/shell/warnx.c: New. Ported from BSD. * libmisc/shell/shellconfig.h: Add the cp command. * libmisc/Makefile.am: Add the new files to the shell. * libmisc/shell/shell.c, libmisc/shell/shell.h: Add scripting support. * libblock/src/flashdisk.c: Fixed disk drive count size setting bug. --- cpukit/libmisc/shell/shell.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'cpukit/libmisc/shell/shell.h') diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h index d9a2a53fe7..d9312a4a6c 100644 --- a/cpukit/libmisc/shell/shell.h +++ b/cpukit/libmisc/shell/shell.h @@ -101,6 +101,29 @@ rtems_status_code rtems_shell_init( int forever ); +/** + * 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. + */ +rtems_status_code rtems_shell_script( + char *task_name, + uint32_t task_stacksize, /*0 default*/ + rtems_task_priority task_priority, + const char *input, + const char *output, + int output_append, + int wait +); + /* * Things that are useful to external entities developing commands and plugging * them in. @@ -117,6 +140,10 @@ typedef struct { int forever ; /* repeat login */ int errorlevel; uintptr_t mdump_addr; + const char* input; + const char* output; + int output_append; + rtems_id wake_on_end; } rtems_shell_env_t; rtems_boolean rtems_shell_main_loop( -- cgit v1.2.3