mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-24 14:12:20 +08:00
shell: Move rtems_shell_init_environment() call
Move rtems_shell_init_environment() call to rtems_shell_set_shell_env() since this function uses the POSIX key.
This commit is contained in:
@@ -200,6 +200,8 @@ static bool rtems_shell_set_shell_env(
|
||||
rtems_shell_env_key_handle *handle;
|
||||
int eno;
|
||||
|
||||
rtems_shell_init_environment();
|
||||
|
||||
handle = malloc(sizeof(rtems_shell_env_key_handle));
|
||||
if (handle == NULL) {
|
||||
rtems_error(0, "no memory for shell env key handle)");
|
||||
@@ -1020,8 +1022,6 @@ bool rtems_shell_main_loop(
|
||||
FILE *stdoutToClose = NULL;
|
||||
FILE *line_editor_output;
|
||||
|
||||
rtems_shell_init_environment();
|
||||
|
||||
if (shell_env->magic != SHELL_MAGIC) {
|
||||
rtems_error(0, "invalid shell environment passed to the main loop)");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user