X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=boot%2Ffreeldr%2Ffreeldr%2Foptions.c;h=78338f2c5d5bd61fad7c3f8b1a5094740d011573;hp=22112303aca91befda7cd137ec9f5bce26065c19;hb=5cdb76094cafa93cb35371470b33ebaf1ad09ad7;hpb=eae27787e5ab44c69661672bc501ce6bba6ec4e5 diff --git a/boot/freeldr/freeldr/options.c b/boot/freeldr/freeldr/options.c index 22112303aca..78338f2c5d5 100644 --- a/boot/freeldr/freeldr/options.c +++ b/boot/freeldr/freeldr/options.c @@ -17,9 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/* INCLUDES *******************************************************************/ + #include #include +/* GLOBALS ********************************************************************/ + PCSTR OptionsMenuList[] = { "Safe Mode", @@ -46,10 +50,11 @@ PCSTR OptionsMenuList[] = #endif }; +const PCSTR FrldrDbgMsg = "Enable FreeLdr debug channels\n" "Acceptable syntax: [level1]#channel1[,[level2]#channel2]\n" "level can be one of: trace,warn,fixme,err\n" - " if the level is ommited all levels\n" + " if the level is omitted all levels\n" " are enabled for the specified channel\n" "# can be either + or -\n" "channel can be one of the following:\n" @@ -61,9 +66,7 @@ PCSTR FrldrDbgMsg = "Enable FreeLdr debug channels\n" " +peloader\n" "NOTE: all letters must be lowercase, no spaces allowed."; -// -// The boot options are mutually exclusive. -// +/* The boot options are mutually exclusive */ enum BootOption { NO_OPTION = 0, @@ -76,13 +79,13 @@ enum BootOption DIRECTORY_SERVICES_RESTORE_MODE, }; -ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]); - static enum BootOption BootOptionChoice = NO_OPTION; static BOOLEAN BootLogging = FALSE; static BOOLEAN VgaMode = FALSE; static BOOLEAN DebuggingMode = FALSE; +/* FUNCTIONS ******************************************************************/ + VOID DoOptionsMenu(VOID) { ULONG SelectedMenuItem; @@ -91,17 +94,18 @@ VOID DoOptionsMenu(VOID) if (!UiDisplayMenu("Select an option:", "", TRUE, OptionsMenuList, - OptionsMenuItemCount, - 0, -1, + sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]), + 11, // Use "Start ReactOS normally" as default; see the switch below. + -1, &SelectedMenuItem, TRUE, NULL)) { - // The user pressed ESC + /* The user pressed ESC */ return; } - // Clear the backdrop + /* Clear the backdrop */ UiDrawBackdrop(); switch (SelectedMenuItem) @@ -242,15 +246,15 @@ VOID AppendBootTimeOptions(PCHAR BootOptions) switch (BootOptionChoice) { case SAFE_MODE: - strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS /NOGUIBOOT"); break; case SAFE_MODE_WITH_NETWORKING: - strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS /NOGUIBOOT"); break; case SAFE_MODE_WITH_COMMAND_PROMPT: - strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS /NOGUIBOOT"); break; case LAST_KNOWN_GOOD_CONFIGURATION: