mirror of
https://github.com/reactos/reactos.git
synced 2025-04-09 23:37:40 +00:00
[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:
parent
74872db16c
commit
994d960b81
1 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue