Author: cgutman
Date: Sat May 29 00:54:27 2010
New Revision: 47387
URL:
http://svn.reactos.org/svn/reactos?rev=47387&view=rev
Log:
[FREELOADER]
- Fix DoOptionsMenu and implement AppendBootOptions to support F8 boot options
- Fixes bug 5363
Modified:
trunk/reactos/boot/freeldr/freeldr/include/options.h
trunk/reactos/boot/freeldr/freeldr/options.c
trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/include/options.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/options.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/options.h [iso-8859-1] Sat May 29 00:54:27
2010
@@ -20,3 +20,4 @@
#pragma once
VOID DoOptionsMenu(VOID);
+VOID AppendBootTimeOptions(PCHAR BootOptions);
Modified: trunk/reactos/boot/freeldr/freeldr/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/optio…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] Sat May 29 00:54:27 2010
@@ -69,6 +69,15 @@
ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
+BOOLEAN SafeMode = FALSE;
+BOOLEAN SafeModeWithNetworking = FALSE;
+BOOLEAN SafeModeWithCommandPrompt = FALSE;
+BOOLEAN BootLogging = FALSE;
+BOOLEAN VgaMode = FALSE;
+BOOLEAN LastKnownGoodConfiguration = FALSE;
+BOOLEAN DirectoryServicesRepairMode = FALSE;
+BOOLEAN DebuggingMode = FALSE;
+
VOID DoOptionsMenu(VOID)
{
ULONG SelectedMenuItem;
@@ -85,22 +94,33 @@
switch (SelectedMenuItem)
{
case SAFE_MODE:
+ SafeMode = TRUE;
+ BootLogging = TRUE;
break;
case SAFE_MODE_WITH_NETWORKING:
+ SafeModeWithNetworking = TRUE;
+ BootLogging = TRUE;
break;
case SAFE_MODE_WITH_COMMAND_PROMPT:
+ SafeModeWithCommandPrompt = TRUE;
+ BootLogging = TRUE;
break;
//case SEPARATOR1:
// break;
case ENABLE_BOOT_LOGGING:
+ BootLogging = TRUE;
break;
case ENABLE_VGA_MODE:
+ VgaMode = TRUE;
break;
case LAST_KNOWN_GOOD_CONFIGURATION:
+ LastKnownGoodConfiguration = TRUE;
break;
case DIRECTORY_SERVICES_RESTORE_MODE:
+ DirectoryServicesRepairMode = TRUE;
break;
case DEBUGGING_MODE:
+ DebuggingMode = TRUE;
break;
//case SEPARATOR2:
// break;
@@ -117,3 +137,29 @@
}
}
+VOID AppendBootTimeOptions(PCHAR BootOptions)
+{
+ if (SafeMode)
+ strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should
also be specified
+
+ if (SafeModeWithNetworking)
+ strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should
also be specified
+
+ if (SafeModeWithCommandPrompt)
+ strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME:
NOGUIBOOT should also be specified
+
+ if (BootLogging)
+ strcat(BootOptions, " /BOOTLOG");
+
+ if (VgaMode)
+ strcat(BootOptions, " /BASEVIDEO");
+
+ if (LastKnownGoodConfiguration)
+ DbgPrint("Last known good configuration is not supported yet!\n");
+
+ if (DirectoryServicesRepairMode)
+ strcat(BootOptions, " /SAFEBOOT:DSREPAIR /SOS");
+
+ if (DebuggingMode)
+ strcat(BootOptions, " /DEBUG");
+}
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Sat May 29 00:54:27
2010
@@ -606,6 +606,11 @@
//
if (IniReadSettingByName(SectionId, "Options", value, sizeof(value)))
{
+ //
+ // Append boot-time options
+ //
+ AppendBootTimeOptions(value);
+
//
// Check if a ramdisk file was given
//
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sat May 29 00:54:27
2010
@@ -475,6 +475,9 @@
DPRINTM(DPRINT_WINDOWS,"BootOptions: '%s'\n", BootOptions);
}
+ /* Append boot-time options */
+ AppendBootTimeOptions(BootOptions);
+
//
// Check if a ramdisk file was given
//