Author: fireball
Date: Fri Sep 25 11:28:37 2009
New Revision: 43142
URL:
http://svn.reactos.org/svn/reactos?rev=43142&view=rev
Log:
[winldr]
- Load and use debug boot options if built with DBG (mimics old reactos setupldr
behaviour).
Modified:
trunk/reactos/boot/freeldr/freeldr/windows/setupldr2.c
Modified: trunk/reactos/boot/freeldr/freeldr/windows/setupldr2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/setupldr2.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/setupldr2.c [iso-8859-1] Fri Sep 25
11:28:37 2009
@@ -157,7 +157,7 @@
CHAR SystemPath[512], SearchPath[512];
CHAR FileName[512];
CHAR BootPath[512];
- LPCSTR BootOptions;
+ LPCSTR LoadOptions, DbgOptions, BootOptions;
PVOID NtosBase = NULL, HalBase = NULL, KdComBase = NULL;
BOOLEAN Status;
ULONG i, ErrorLine;
@@ -204,7 +204,7 @@
}
}
- /* Load options */
+ /* Get Load options - debug and non-debug */
if (!InfFindFirstLine(InfHandle,
"SetupData",
"OsLoadOptions",
@@ -214,11 +214,29 @@
return;
}
- if (!InfGetDataField (&InfContext, 1, &BootOptions))
+ if (!InfGetDataField (&InfContext, 1, &LoadOptions))
{
printf("Failed to get load options\n");
return;
}
+
+ BootOptions = LoadOptions;
+
+#if DBG
+ /* Get debug load options and use them */
+ if (InfFindFirstLine(InfHandle,
+ "SetupData",
+ "DbgOsLoadOptions",
+ &InfContext))
+ {
+ if (!InfGetDataField(&InfContext, 1, &DbgOptions))
+ DbgOptions = "";
+ else
+ BootOptions = DbgOptions;
+ }
+#endif
+
+ DPRINTM(DPRINT_WINDOWS,"BootOptions: '%s'\n", BootOptions);
SetupUiInitialize();
UiDrawStatusText("");