mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[FREELDR]: Fix initialization of BootPath variable, and add some explanation comment as requested long time ago by Pierre.
svn path=/trunk/; revision=66173
This commit is contained in:
parent
23a57a334f
commit
927ab9996d
|
@ -183,8 +183,16 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
|
||||||
if (!HasSection ||
|
if (!HasSection ||
|
||||||
!IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
|
!IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* IMPROVE: I don't want to call MachDiskGetBootPath here as a
|
||||||
|
* default choice because I can call it after (see few lines below).
|
||||||
|
* Also doing the strcpy call as it is done in winldr.c is not
|
||||||
|
* really what we want. Instead I reset BootPath here so that
|
||||||
|
* we can build the full path using the general code from below.
|
||||||
|
*/
|
||||||
// MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
// MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
||||||
// strcpy(BootPath, SectionName);
|
// strcpy(BootPath, SectionName);
|
||||||
|
BootPath[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -239,7 +247,7 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
|
||||||
/* Load the ramdisk */
|
/* Load the ramdisk */
|
||||||
if (!RamDiskLoadVirtualFile(FileName))
|
if (!RamDiskLoadVirtualFile(FileName))
|
||||||
{
|
{
|
||||||
UiMessageBox("Failed to load RAM disk file %s\n", FileName);
|
UiMessageBox("Failed to load RAM disk file %s", FileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,7 +264,7 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
|
||||||
SystemPath = SourcePaths[i];
|
SystemPath = SourcePaths[i];
|
||||||
if (!SystemPath)
|
if (!SystemPath)
|
||||||
{
|
{
|
||||||
UiMessageBox("Failed to open txtsetup.sif\n");
|
UiMessageBox("Failed to open txtsetup.sif");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strcpy(File, SystemPath);
|
strcpy(File, SystemPath);
|
||||||
|
|
Loading…
Reference in a new issue