[FREELDR] Allow empty RDPATH parameter

In that case, read the whole partition/disk, instead of the selected file.

CORE-14603
This commit is contained in:
Hervé Poussineau 2025-04-27 23:39:52 +02:00
parent c27a2fc7cb
commit 9b70d4380c
2 changed files with 5 additions and 5 deletions

View file

@ -272,11 +272,11 @@ RamDiskInitialize(
}
if (*FileName)
{
Status = RamDiskLoadVirtualFile(FileName, DefaultPath);
if (Status != ESUCCESS)
return Status;
}
else
Status = RamDiskLoadVirtualFile(DefaultPath, NULL);
if (Status != ESUCCESS)
return Status;
}
/* Adjust the Ramdisk image length if needed */

View file

@ -1114,7 +1114,7 @@ LoadAndBootWindows(
/* Check if a RAM disk file was given */
FileName = NtLdrGetOptionEx(BootOptions, "RDPATH=", &FileNameLength);
if (FileName && (FileNameLength > 7))
if (FileName && (FileNameLength >= 7))
{
/* Load the RAM disk */
Status = RamDiskInitialize(FALSE, BootOptions, SystemPartition);