CHAR SystemPath[512], SearchPath[512];
CHAR FileName[512];
CHAR BootPath[512];
- LPCSTR BootOptions;
+ LPCSTR LoadOptions, BootOptions;
+#if DBG
+ LPCSTR DbgOptions;
+#endif
PVOID NtosBase = NULL, HalBase = NULL, KdComBase = NULL;
BOOLEAN Status;
ULONG i, ErrorLine;
NULL
};
- /* Try to open system drive */
- FsOpenBootVolume();
-
/* Open 'txtsetup.sif' from any of source paths */
MachDiskGetBootPath(SystemPath, sizeof(SystemPath));
for (i = MachDiskBootingFromFloppy() ? 0 : 1; ; i++)
}
}
- /* Load options */
+ /* Get Load options - debug and non-debug */
if (!InfFindFirstLine(InfHandle,
"SetupData",
"OsLoadOptions",
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("");
UiDrawStatusText("Detecting Hardware...");