[NTOS:IOMGR] When booting from a ramdisk, always assign drive letter X: to it

The only incomplete part to boot the LiveCD from PXE is some support in ramdisk.sys

svn path=/trunk/; revision=65868
This commit is contained in:
Hervé Poussineau 2014-12-28 22:33:17 +00:00
parent 74872db16c
commit 994d960b81

View file

@ -249,6 +249,25 @@ IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
0);
}
//
// ReactOS hack (drive letter should not be hardcoded, and maybe set by mountmgr.sys)
//
{
ANSI_STRING AnsiPath;
CHAR Buffer[256];
UNICODE_STRING NtSystemRoot;
UNICODE_STRING DriveLetter = RTL_CONSTANT_STRING(L"\\??\\X:");
AnsiPath.Length = sprintf(Buffer, "X:%s", LoaderBlock->NtBootPathName);
AnsiPath.MaximumLength = AnsiPath.Length + 1;
AnsiPath.Buffer = Buffer;
RtlInitEmptyUnicodeString(&NtSystemRoot,
SharedUserData->NtSystemRoot,
sizeof(SharedUserData->NtSystemRoot));
RtlAnsiStringToUnicodeString(&NtSystemRoot, &AnsiPath, FALSE);
IoCreateSymbolicLink(&DriveLetter, &DeviceString);
}
//
// We made it
//