- Format code of InstallFatBootcodeToPartition(), changing from tabs+spaces mix to tabs only (use "ignore whitespaces" settings to view other changes)

- Change installation logic when installing to a NTLDR's boot.ini: Firstly freeldr.ini is checked for existence, and either created or updated, then boot.ini is checked for having a proper entry, and if needed - entry is added. Fixes related bugs (having more and more ReactOS entries, no entry added if freeldr.ini already exists in the root folder)

svn path=/trunk/; revision=24392
This commit is contained in:
Aleksey Bragin 2006-10-04 12:26:12 +00:00
parent 41dea75354
commit 778bad347c

View file

@ -1832,20 +1832,6 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
return Status;
}
}
/* Update 'boot.ini' */
wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\boot.ini");
DPRINT1("Update 'boot.ini': %S\n", DstPath);
Status = UpdateBootIni(DstPath,
L"C:\\bootsect.ros",
L"\"ReactOS\"");
if (!NT_SUCCESS(Status))
{
DPRINT1("UpdateBootIni() failed (Status %lx)\n", Status);
return Status;
}
}
else
{
@ -1862,6 +1848,20 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
return Status;
}
}
/* Update 'boot.ini' */
wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\boot.ini");
DPRINT1("Update 'boot.ini': %S\n", DstPath);
Status = UpdateBootIni(DstPath,
L"C:\\bootsect.ros",
L"\"ReactOS\"");
if (!NT_SUCCESS(Status))
{
DPRINT1("UpdateBootIni() failed (Status %lx)\n", Status);
return Status;
}
}
else if (DoesFileExist(SystemRootPath->Buffer, L"io.sys") == TRUE ||
DoesFileExist(SystemRootPath->Buffer, L"msdos.sys") == TRUE)