Author: hpoussin
Date: Sun Dec 28 22:33:17 2014
New Revision: 65868
URL: http://svn.reactos.org/svn/reactos?rev=65868&view=rev
Log:
[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
Modified:
trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/ramdisk.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c [iso-8859-1] Sun Dec 28 22:33:17 2014
@@ -250,6 +250,25 @@
}
//
+ // 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
//
return STATUS_SUCCESS;