summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2007-12-22 08:27:18 +0000
committerChris Johns <chrisj@rtems.org>2007-12-22 08:27:18 +0000
commit1ff9922df0f6e5f129299847d0f5eccbc8d6806c (patch)
tree07d27ca9b48c51998530281353a246286fdf1698 /cpukit/libmisc/shell/shell.h
parent2007-12-21 Xi Yang <hiyangxi@gmail.com> (diff)
downloadrtems-1ff9922df0f6e5f129299847d0f5eccbc8d6806c.tar.bz2
2007-12-22 Chris Johns <chrisj@rtems.org>
* 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.
Diffstat (limited to 'cpukit/libmisc/shell/shell.h')
-rw-r--r--cpukit/libmisc/shell/shell.h27
1 files changed, 27 insertions, 0 deletions
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(