diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/libmisc/shell/shell.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index c00883ba66..64f90be121 100644 --- a/cpukit/libmisc/shell/shell.c +++ b/cpukit/libmisc/shell/shell.c @@ -1010,6 +1010,31 @@ static bool shell_main_loop( return result; } +bool rtems_shell_run_main_loop( + rtems_shell_env_t *shell_env, + bool interactive, + FILE *line_editor_output +) +{ + bool result; + + if (shell_env->magic != SHELL_MAGIC) { + return false; + } + + if (!rtems_shell_init_user_env()) { + return false; + } + + if (!rtems_shell_set_shell_env(shell_env)) { + return false; + } + + result = shell_main_loop(shell_env, interactive, line_editor_output); + rtems_shell_clear_shell_env(); + return result; +} + bool rtems_shell_main_loop( rtems_shell_env_t *shell_env ) |