Skip to content

Commit c11df0f

Browse files
committed
[USETUP] Install rosload.exe
1 parent c317e8f commit c11df0f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

base/setup/lib/bootsup.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ InstallMbrBootCodeToDisk(
880880
InstallMbrBootCode);
881881
}
882882

883-
884883
static
885884
NTSTATUS
886885
InstallBootloaderFiles(
@@ -895,7 +894,19 @@ InstallBootloaderFiles(
895894
CombinePaths(SrcPath, ARRAYSIZE(SrcPath), 2, SourceRootPath->Buffer, L"\\loader\\freeldr.sys");
896895
CombinePaths(DstPath, ARRAYSIZE(DstPath), 2, SystemRootPath->Buffer, L"freeldr.sys");
897896

898-
DPRINT1("Copy: %S ==> %S\n", SrcPath, DstPath);
897+
DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
898+
Status = SetupCopyFile(SrcPath, DstPath, FALSE);
899+
if (!NT_SUCCESS(Status))
900+
{
901+
DPRINT1("SetupCopyFile() failed (Status 0x%08lx)\n", Status);
902+
return Status;
903+
}
904+
905+
/* Copy rosload to the system partition, always overwriting the older version */
906+
CombinePaths(SrcPath, ARRAYSIZE(SrcPath), 2, SourceRootPath->Buffer, L"\\loader\\rosload.exe");
907+
CombinePaths(DstPath, ARRAYSIZE(DstPath), 2, SystemRootPath->Buffer, L"rosload.exe");
908+
909+
DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
899910
Status = SetupCopyFile(SrcPath, DstPath, FALSE);
900911
if (!NT_SUCCESS(Status))
901912
{

base/setup/lib/utils/bldrsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ NtLdrEnumerateBootEntries(
124124
// Question 2: What if many config files are possible?
125125
NTOS_BOOT_LOADER_FILES NtosBootLoaders[] =
126126
{
127-
{FreeLdr, L"freeldr.sys\0", L"freeldr.ini",
127+
{FreeLdr, L"freeldr.sys\0" L"rosload.exe\0", L"freeldr.ini",
128128
OpenIniBootLoaderStore, CloseIniBootLoaderStore, (PENUM_BOOT_STORE_ENTRIES)FreeLdrEnumerateBootEntries},
129129
{NtLdr , L"ntldr\0" L"osloader.exe\0", L"boot.ini",
130130
OpenIniBootLoaderStore, CloseIniBootLoaderStore, (PENUM_BOOT_STORE_ENTRIES)NtLdrEnumerateBootEntries },

0 commit comments

Comments
 (0)