Initialize shell only once

This commit is contained in:
2026-07-31 20:06:08 +02:00
parent f456cfd21e
commit b510e88745
3 changed files with 21 additions and 7 deletions

View File

@@ -307,6 +307,24 @@ Shell::ExecuteCommand(IN ULONG Argc,
Console::Print(L"ERROR: '%S' is not recognized as a valid command.\n", Argv[0]);
}
/**
* Initializes the bootloader shell.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
Shell::InitializeShell()
{
/* Initialize the shell commands list */
RTL::LinkedList::InitializeListHead(&ShellCommands);
/* Register all built-in commands */
RegisterBuiltinCommands();
}
/**
* Splits the supplied raw command line string into an argument count and an argument vector suitable
* for command dispatch. The input string is tokenized by whitespace.
@@ -881,12 +899,6 @@ Shell::StartLoaderShell()
/* Initialize console */
Console::InitializeConsole();
/* Initialize the shell commands list */
RTL::LinkedList::InitializeListHead(&ShellCommands);
/* Register all built-in commands */
RegisterBuiltinCommands();
/* Clear the shell exit request flag */
ExitRequest = FALSE;