Index: fstub/disksup.c =================================================================== --- fstub/disksup.c (revision 39028) +++ fstub/disksup.c (working copy) @@ -47,7 +47,9 @@ IN UCHAR DriveType, IN ULONG Signature, IN LARGE_INTEGER StartingOffset, - IN HANDLE hKey) + IN HANDLE hKey, + IN PUNICODE_STRING BootDevice, + OUT PUCHAR NtSystemPath) { WCHAR DriveNameBuffer[16]; UNICODE_STRING DriveName; @@ -128,6 +130,11 @@ DPRINT1("ZwCreateValueKey failed for %wZ, status=%x\n", &DriveName, Status); } } + + if (RtlCompareUnicodeString(PartitionName,BootDevice,FALSE) == 0) + { + *NtSystemPath = 'A' + DriveNumber; + } return TRUE; } @@ -420,7 +427,12 @@ PKEY_VALUE_PARTIAL_INFORMATION PartialInformation; PREG_DISK_MOUNT_INFO DiskMountInfo; ULONG RDiskCount; + UNICODE_STRING BootDevice; + Status = RtlAnsiStringToUnicodeString(&BootDevice, + NtDeviceName, + TRUE); + DPRINT("xHalIoAssignDriveLetters()\n"); ConfigInfo = IoGetConfigurationInformation(); @@ -612,7 +624,9 @@ DOSDEVICE_DRIVE_FIXED, DiskMountInfo->Signature, DiskMountInfo->StartingOffset, - NULL); + NULL, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[i]->PartitionEntry[j].RewritePartition = TRUE; } @@ -662,7 +676,9 @@ DOSDEVICE_DRIVE_FIXED, LayoutArray[DiskNumber]->Signature, LayoutArray[DiskNumber]->PartitionEntry[j].StartingOffset, - hKey); + hKey, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition = TRUE; } @@ -702,7 +718,9 @@ DOSDEVICE_DRIVE_FIXED, LayoutArray[DiskNumber]->Signature, LayoutArray[DiskNumber]->PartitionEntry[j].StartingOffset, - hKey); + hKey, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition = TRUE; } @@ -741,7 +759,9 @@ DOSDEVICE_DRIVE_FIXED, LayoutArray[DiskNumber]->Signature, LayoutArray[DiskNumber]->PartitionEntry[j].StartingOffset, - hKey); + hKey, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition = TRUE; } @@ -776,7 +796,9 @@ DOSDEVICE_DRIVE_FIXED, LayoutArray[DiskNumber]->Signature, LayoutArray[DiskNumber]->PartitionEntry[j].StartingOffset, - hKey); + hKey, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition = TRUE; } @@ -812,7 +834,9 @@ DOSDEVICE_DRIVE_FIXED, LayoutArray[DiskNumber]->Signature, LayoutArray[DiskNumber]->PartitionEntry[j].StartingOffset, - hKey); + hKey, + &BootDevice, + NtSystemPath); /* Mark the partition as assigned */ LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition = TRUE; } @@ -844,7 +868,9 @@ DOSDEVICE_DRIVE_REMOVABLE, 0, RtlConvertLongToLargeInteger(0), - hKey); + hKey, + &BootDevice, + NtSystemPath); } } } @@ -875,7 +901,9 @@ DOSDEVICE_DRIVE_REMOVABLE, 0, RtlConvertLongToLargeInteger(0), - hKey); + hKey, + &BootDevice, + NtSystemPath); } /* Assign cdrom drives */ @@ -895,7 +923,9 @@ DOSDEVICE_DRIVE_CDROM, 0, RtlConvertLongToLargeInteger(0), - hKey); + hKey, + &BootDevice, + NtSystemPath); } /* Anything else to do? */ Index: io/iomgr/arcname.c =================================================================== --- io/iomgr/arcname.c (revision 39028) +++ io/iomgr/arcname.c (working copy) @@ -114,8 +114,6 @@ /* Return whether this is the CD or not */ if ((InitIsWinPEMode) || (ExpInTextModeSetup)) { - /* Hack until IoAssignDriveLetters is fixed */ - swprintf(SharedUserData->NtSystemRoot, L"%c:\\%hs", 'C' + DeviceNumber, RosSysPath); return TRUE; }