mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 18:02:05 +00:00
Support "i386" as an alternative name for cdrom directory
svn path=/trunk/; revision=29353
This commit is contained in:
parent
f649143b56
commit
ba13c6e131
1 changed files with 23 additions and 15 deletions
|
@ -167,9 +167,20 @@ LoadNlsFile(PCSTR szSourcePath, PCSTR szFileName, PCSTR szModuleName)
|
|||
VOID RunLoader(VOID)
|
||||
{
|
||||
ULONG_PTR Base;
|
||||
ULONG Size;
|
||||
ULONG Size, i;
|
||||
const char *SourcePath;
|
||||
const char *LoadOptions = "", *DbgLoadOptions = "";
|
||||
const char *sourcePaths[] = {
|
||||
"", /* Only for floppy boot */
|
||||
#if defined(_M_IX86)
|
||||
"\\I386",
|
||||
#elif defined(_M_MPPC)
|
||||
"\\PPC",
|
||||
#elif defined(_M_MRX000)
|
||||
"\\MIPS",
|
||||
#endif
|
||||
"\\reactos",
|
||||
NULL };
|
||||
char szKernelName[256];
|
||||
|
||||
HINF InfHandle;
|
||||
|
@ -246,13 +257,21 @@ VOID RunLoader(VOID)
|
|||
}
|
||||
|
||||
/* Open 'txtsetup.sif' */
|
||||
if (!InfOpenFile (&InfHandle,
|
||||
MachDiskBootingFromFloppy() ? "\\txtsetup.sif" : "\\reactos\\txtsetup.sif",
|
||||
&ErrorLine))
|
||||
for (i = MachDiskBootingFromFloppy() ? 0 : 1; ; i++)
|
||||
{
|
||||
SourcePath = sourcePaths[i];
|
||||
if (!SourcePath)
|
||||
{
|
||||
printf("Failed to open 'txtsetup.sif'\n");
|
||||
return;
|
||||
}
|
||||
strcpy(szKernelName, SourcePath);
|
||||
strcat(szKernelName, "\\txtsetup.sif");
|
||||
if (InfOpenFile (&InfHandle, szKernelName, &ErrorLine))
|
||||
break;
|
||||
}
|
||||
if (!*SourcePath)
|
||||
SourcePath = "\\";
|
||||
|
||||
#ifdef DBG
|
||||
/* Get load options */
|
||||
|
@ -285,17 +304,6 @@ VOID RunLoader(VOID)
|
|||
printf("LoadOptions: '%s'\n", LoadOptions);
|
||||
#endif
|
||||
|
||||
if (MachDiskBootingFromFloppy())
|
||||
{
|
||||
/* Boot from floppy disk */
|
||||
SourcePath = "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Boot from cdrom */
|
||||
SourcePath = "\\reactos";
|
||||
}
|
||||
|
||||
/* Set kernel command line */
|
||||
MachDiskGetBootPath(reactos_kernel_cmdline, sizeof(reactos_kernel_cmdline));
|
||||
strcat(strcat(strcat(strcat(reactos_kernel_cmdline, SourcePath), " "),
|
||||
|
|
Loading…
Reference in a new issue