From c681e13dae6699b4cdb0b690ff5ab0b3d8cb0464 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 4 Jul 2015 16:10:50 +0000 Subject: [PATCH] [USETUP] Assign the HiddenSectors values properly. svn path=/trunk/; revision=68340 --- reactos/base/setup/usetup/partlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index d3db63d4557..8d6737143cb 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -2327,6 +2327,7 @@ UpdateDiskLayout( PPARTITION_INFORMATION LinkInfo = NULL; PLIST_ENTRY ListEntry; PPARTENTRY PartEntry; + LARGE_INTEGER HiddenSectors64; ULONG Index; ULONG PartitionNumber = 1; @@ -2356,7 +2357,7 @@ UpdateDiskLayout( PartitionInfo->StartingOffset.QuadPart = PartEntry->StartSector.QuadPart * DiskEntry->BytesPerSector; PartitionInfo->PartitionLength.QuadPart = PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector; - PartitionInfo->HiddenSectors = (ULONG)PartEntry->StartSector.QuadPart; + PartitionInfo->HiddenSectors = PartEntry->StartSector.LowPart; PartitionInfo->PartitionNumber = (!IsContainerPartition(PartEntry->PartitionType)) ? PartitionNumber : 0; PartitionInfo->PartitionType = PartEntry->PartitionType; PartitionInfo->BootIndicator = PartEntry->BootIndicator; @@ -2406,7 +2407,8 @@ UpdateDiskLayout( { LinkInfo->StartingOffset.QuadPart = (PartEntry->StartSector.QuadPart - DiskEntry->SectorAlignment) * DiskEntry->BytesPerSector; LinkInfo->PartitionLength.QuadPart = (PartEntry->StartSector.QuadPart + DiskEntry->SectorAlignment) * DiskEntry->BytesPerSector; - LinkInfo->HiddenSectors = (ULONG)(PartEntry->StartSector.QuadPart - DiskEntry->SectorAlignment - DiskEntry->ExtendedPartition->StartSector.QuadPart); + HiddenSectors64.QuadPart = PartEntry->StartSector.QuadPart - DiskEntry->SectorAlignment - DiskEntry->ExtendedPartition->StartSector.QuadPart; + LinkInfo->HiddenSectors = HiddenSectors64.LowPart; LinkInfo->PartitionNumber = 0; LinkInfo->PartitionType = PARTITION_EXTENDED; LinkInfo->BootIndicator = FALSE;