FilePointer = FsOpenFile(szFileName);
/* Try under the system root in the main dir and drivers */
- if (FilePointer == NULL)
+ if (!FilePointer)
{
strcpy(value, SystemRoot);
if(value[strlen(value)-1] != '\\')
FilePointer = FsOpenFile(value);
}
- if (FilePointer == NULL)
+ if (!FilePointer)
{
strcpy(value, SystemRoot);
if(value[strlen(value)-1] != '\\')
FilePointer = FsOpenFile(value);
}
- if (FilePointer == NULL)
+ if (!FilePointer)
{
strcpy(value, SystemRoot);
if(value[strlen(value)-1] != '\\')
}
/* Make sure we did */
- if (FilePointer == NULL) {
+ if (!FilePointer) {
/* Fail if file wasn't opened */
strcpy(value, szFileName);
FilePointer = FsOpenFile(szFileName);
/* Make sure we did */
- if (FilePointer == NULL) {
+ if (!FilePointer) {
/* Fail if file wasn't opened */
strcpy(value, szFileName);
UiDrawStatusText("Loading...");
- //
- // If we have a ramdisk, this will switch to the ramdisk disk routines
- // which read from memory instead of using the firmware. This has to be done
- // after hardware detection, since hardware detection will require using the
- // real routines in order to perform disk-detection (just because we're on a
- // ram-boot doesn't mean the user doesn't have actual disks installed too!)
- //
- RamDiskSwitchFromBios();
-
- /*
- * Try to open system drive
- */
- if (!FsOpenSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice))
- {
- UiMessageBox("Failed to open system drive.");
- return;
- }
+ /* Get boot path */
+ if (strchr(SystemPath, '\\') != NULL)
+ strcpy(szBootPath, strchr(SystemPath, '\\'));
+ else
+ szBootPath[0] = '\0';
/* append a backslash */
if ((strlen(szBootPath)==0) ||
DPRINTM(DPRINT_REACTOS, "SystemHive: '%s'", szFileName);
FilePointer = FsOpenFile(szFileName);
- if (FilePointer == NULL)
+ if (!FilePointer)
{
UiMessageBox("Could not find the System hive!");
return;
UiMessageBox("Could not load the System hive!\n");
return;
}
- DPRINTM(DPRINT_REACTOS, "SystemHive loaded at 0x%x size %u", (unsigned)Base, (unsigned)Size);
+ DPRINTM(DPRINT_REACTOS, "SystemHive loaded at 0x%x size %u\n", (unsigned)Base, (unsigned)Size);
/*
* Import the loaded system hive