summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/shell.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/shell.h')
-rw-r--r--cpukit/include/rtems/shell.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/cpukit/include/rtems/shell.h b/cpukit/include/rtems/shell.h
index d705dcb0a7..f8b677d5cd 100644
--- a/cpukit/include/rtems/shell.h
+++ b/cpukit/include/rtems/shell.h
@@ -5,13 +5,12 @@
*/
/*
- * Author:
+ * Copyright (c) 2001 Fernando Ruiz Casas <fruizcasas@gmail.com>
*
- * WORK: fernando.ruiz@ctv.es
- * HOME: correo@fernando-ruiz.com
- *
- * Thanks at:
- * Chris Johns
+ * 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_H__
@@ -255,6 +254,31 @@ bool rtems_shell_main_loop(
rtems_shell_env_t *rtems_shell_env
);
+/**
+ * @brief Runs the shell main loop.
+ *
+ * The caller shall initialize the shell environment. It is recommended that
+ * the caller duplicates the current shell environment using
+ * rtems_shell_dup_current_env() and then performs the required customization.
+ * Shell commands will use the stdin, stdout, and stderr file streams set up by
+ * the caller.
+ *
+ * @param interactive indicates if the shell main loop interfaces with an
+ * interactive user. For an interactive user, a welcome message using
+ * "/etc/motd" is presented and command prompt is displayed.
+ *
+ * @param[in, out] line_editor_output is the optional line editor output file
+ * stream. It may be NULL, to disable the line editor output.
+ *
+ * @return Returns true, if no error occurred and a shell exit was requested,
+ * otherwise false.
+ */
+bool rtems_shell_run_main_loop(
+ rtems_shell_env_t *shell_env,
+ bool interactive,
+ FILE *line_editor_output
+);
+
extern const rtems_shell_env_t rtems_global_shell_env;
rtems_shell_env_t *rtems_shell_get_current_env(void);