* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
#include "freeldr.h"
#include "asmcode.h"
#include "reactos.h"
return;
}
+ /*
+ * Find the hal image name
+ */
+ if(!ReadSectionSettingByName(SectionId, "Hal", value, 1024))
+ {
+ MessageBox("HAL image file not specified for selected operating system.");
+ return;
+ }
+
DrawBackdrop();
DrawStatusText(" Loading...");
}
/*
- * Parse the ini file and count the kernel and drivers
+ * Parse the ini file and count the kernel, hal and drivers
*/
for (i=1; i<=GetNumSectionItems(SectionId); i++)
{
* Read the setting and check if it's a driver
*/
ReadSectionSettingByNumber(SectionId, i, name, 1024, value, 1024);
- if ((stricmp(name, "Kernel") == 0) || (stricmp(name, "Driver") == 0))
+ if ((stricmp(name, "Kernel") == 0) ||
+ (stricmp(name, "Hal") == 0) ||
+ (stricmp(name, "Driver") == 0))
nNumDriverFiles++;
}
DrawProgressBar((nNumFilesLoaded * 100) / nNumDriverFiles);
}
+ /*
+ * Find the HAL image name
+ * and try to load the kernel off the disk
+ */
+ if(ReadSectionSettingByName(SectionId, "Hal", value, 1024))
+ {
+ /*
+ * Set the name and try to open the PE image
+ */
+ //strcpy(szFileName, szBootPath);
+ //strcat(szFileName, value);
+ strcpy(szFileName, value);
+
+ FilePointer = OpenFile(szFileName);
+ if (FilePointer == NULL)
+ {
+ strcat(value, " not found.");
+ MessageBox(value);
+ return;
+ }
+
+ /*
+ * Update the status bar with the current file
+ */
+ strcpy(name, " Reading ");
+ strcat(name, value);
+ while (strlen(name) < 80)
+ strcat(name, " ");
+ DrawStatusText(name);
+
+ /*
+ * Load the HAL image
+ */
+ MultiBootLoadModule(FilePointer, szFileName);
+
+ nNumFilesLoaded++;
+ DrawProgressBar((nNumFilesLoaded * 100) / nNumDriverFiles);
+ }
+
/*
* Parse the ini file and load the kernel and
* load all the drivers specified