Author: hbelusca
Date: Thu Feb 5 21:17:35 2015
New Revision: 66173
URL: http://svn.reactos.org/svn/reactos?rev=66173&view=rev
Log:
[FREELDR]: Fix initialization of BootPath variable, and add some explanation comment as requested long time ago by Pierre.
Modified:
trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] Thu Feb 5 21:17:35 2015
@@ -183,8 +183,16 @@
if (!HasSection ||
!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));
// strcpy(BootPath, SectionName);
+ BootPath[0] = '\0';
}
/*
@@ -239,7 +247,7 @@
/* Load the ramdisk */
if (!RamDiskLoadVirtualFile(FileName))
{
- UiMessageBox("Failed to load RAM disk file %s\n", FileName);
+ UiMessageBox("Failed to load RAM disk file %s", FileName);
return;
}
}
@@ -256,7 +264,7 @@
SystemPath = SourcePaths[i];
if (!SystemPath)
{
- UiMessageBox("Failed to open txtsetup.sif\n");
+ UiMessageBox("Failed to open txtsetup.sif");
return;
}
strcpy(File, SystemPath);