Author: ion
Date: Wed Feb 7 19:31:24 2007
New Revision: 25747
URL:
http://svn.reactos.org/svn/reactos?rev=25747&view=rev
Log:
- Better fix for LiveCD issue; now it should work no matter what.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/arcname.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/arcname.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c Wed Feb 7 19:31:24 2007
@@ -33,6 +33,8 @@
FILE_BASIC_INFORMATION FileInfo;
NTSTATUS Status;
PCHAR p, q;
+ PCONFIGURATION_INFORMATION ConfigInfo = IoGetConfigurationInformation();
+ extern BOOLEAN InitIsWinPEMode, ExpInTextModeSetup;
/* Only ARC Name left - Build full ARC Name */
p = strstr(KeLoaderBlock->ArcBootDeviceName, "cdrom");
@@ -86,7 +88,7 @@
RtlFreeUnicodeString(&DeviceName);
}
- if (!(strstr(KeLoaderBlock->LoadOptions, "MININT")))
+ if (!InitIsWinPEMode)
{
/* Build the name */
sprintf(p, "cdrom(%lu)", DeviceNumber);
@@ -102,13 +104,16 @@
}
}
}
+
+ /* OK, how many disks are there? */
+ DeviceNumber += ConfigInfo->DiskCount;
/* Return whether this is the CD or not */
- if (DeviceNumber != 1)
+ if ((InitIsWinPEMode) || (ExpInTextModeSetup))
{
/* Hack until IoAssignDriveLetters is fixed */
- swprintf(SharedUserData->NtSystemRoot, L"D:\\reactos");
- return TRUE;
+ swprintf(SharedUserData->NtSystemRoot, L"%c:\\reactos", 'C'
+ DeviceNumber);
+ return TRUE;
}
/* Failed */