[NTOSKRNL]
authorEric Kohl <eric.kohl@reactos.org>
Sat, 17 May 2014 12:55:06 +0000 (12:55 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 17 May 2014 12:55:06 +0000 (12:55 +0000)
xHalIoReadPartitionTable: Only used non-container partition entries have a non-zero partition number.

svn path=/trunk/; revision=63326

reactos/ntoskrnl/fstub/disksup.c

index df2ce49..35ac482 100644 (file)
@@ -1655,8 +1655,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
                     UInt32x32To64(GET_PARTITION_LENGTH(PartitionDescriptor),
                                   SectorSize);
 
                     UInt32x32To64(GET_PARTITION_LENGTH(PartitionDescriptor),
                                   SectorSize);
 
-                /* FIXME: REACTOS HACK */
-                PartitionInfo->PartitionNumber = i + 1;
+                PartitionInfo->PartitionNumber = (!IsContainerPartition(PartitionType)) ? i : 0;
             }
             else
             {
             }
             else
             {
@@ -1667,7 +1666,6 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
                 PartitionInfo->PartitionLength.QuadPart = 0;
                 PartitionInfo->HiddenSectors = 0;
 
                 PartitionInfo->PartitionLength.QuadPart = 0;
                 PartitionInfo->HiddenSectors = 0;
 
-                /* FIXME: REACTOS HACK */
                 PartitionInfo->PartitionNumber = 0;
             }
         }
                 PartitionInfo->PartitionNumber = 0;
             }
         }