Author: fireball Date: Thu Nov 16 20:26:31 2006 New Revision: 24769
URL: http://svn.reactos.org/svn/reactos?rev=24769&view=rev Log: Use Uint32x32To64() function instead of ULONG * ULONG. Fixes partition length truncation. See issue #1871 for more details.
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/disksup.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/fstub/disksup.c (original) +++ trunk/reactos/ntoskrnl/fstub/disksup.c Thu Nov 16 20:26:31 2006 @@ -1583,7 +1583,8 @@ /* Get the starting offset */ PartitionInfo->StartingOffset.QuadPart = StartOffset + - GET_STARTING_SECTOR(PartitionDescriptor) * SectorSize; + UInt32x32To64(GET_STARTING_SECTOR(PartitionDescriptor), + SectorSize);
/* Calculate the number of hidden sectors */ PartitionInfo->HiddenSectors = (PartitionInfo-> @@ -1593,7 +1594,8 @@
/* Get the partition length */ PartitionInfo->PartitionLength.QuadPart = - GET_PARTITION_LENGTH(PartitionDescriptor) * SectorSize; + UInt32x32To64(GET_PARTITION_LENGTH(PartitionDescriptor), + SectorSize);
/* FIXME: REACTOS HACK */ PartitionInfo->PartitionNumber = i + 1; @@ -1637,8 +1639,9 @@ { /* Get its offset */ Offset.QuadPart = VolumeOffset.QuadPart + - GET_STARTING_SECTOR(PartitionDescriptor) * - SectorSize; + UInt32x32To64( + GET_STARTING_SECTOR(PartitionDescriptor), + SectorSize);
/* If this is a primary partition, this is the volume offset */ if (IsPrimary) VolumeOffset = Offset;