Roel Messiant <roelmessiant@gmail.com>

- Fix one of the oldest bugs: "ROS can not parse partition table corectly". The original macro that calculates the space casts the value to ULONG, while ULONGLONG math is required here.
See issue #950 for more details.

svn path=/trunk/; revision=34174
This commit is contained in:
Aleksey Bragin 2008-06-29 08:33:21 +00:00
parent 911fc42a9f
commit 16d2ca207f

View file

@ -406,8 +406,8 @@ ScanForUnpartitionedDiskSpace (PDISKENTRY DiskEntry)
{
/* Round-down to cylinder size */
LastUnusedPartitionLength =
ROUND_DOWN (DiskEntry->DiskSize - (LastStartingOffset + LastPartitionLength),
DiskEntry->CylinderSize);
(DiskEntry->DiskSize - (LastStartingOffset + LastPartitionLength))
& ~(DiskEntry->CylinderSize - 1);
if (LastUnusedPartitionLength >= DiskEntry->CylinderSize)
{