diff --git a/reactos/ntoskrnl/io/disk.c b/reactos/ntoskrnl/io/disk.c index b5fc2e33435..027fb3fdd38 100644 --- a/reactos/ntoskrnl/io/disk.c +++ b/reactos/ntoskrnl/io/disk.c @@ -907,7 +907,8 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject, if ((ReturnRecognizedPartitions == FALSE) || ((ReturnRecognizedPartitions == TRUE) && - IsRecognizedPartition(PartitionSector->Partition[i].PartitionType))) + !IsContainerPartition(PartitionSector->Partition[i].PartitionType) && + PartitionSector->Partition[i].PartitionType != PARTITION_ENTRY_UNUSED)) { /* handle normal partition */ DPRINT("Partition %u: Normal Partition\n", i); @@ -936,13 +937,17 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject, LayoutBuffer->PartitionEntry[Count].HiddenSectors = PartitionSector->Partition[i].StartingBlock; - if (IsRecognizedPartition(PartitionSector->Partition[i].PartitionType)) + if (!IsContainerPartition(PartitionSector->Partition[i].PartitionType) && + PartitionSector->Partition[i].PartitionType != PARTITION_ENTRY_UNUSED) { + LayoutBuffer->PartitionEntry[Count].RecognizedPartition = TRUE; + /* WinXP returns garbage as PartitionNumber */ LayoutBuffer->PartitionEntry[Count].PartitionNumber = Number; Number++; } else { + LayoutBuffer->PartitionEntry[Count].RecognizedPartition = FALSE; LayoutBuffer->PartitionEntry[Count].PartitionNumber = 0; } @@ -950,8 +955,6 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject, PartitionSector->Partition[i].PartitionType; LayoutBuffer->PartitionEntry[Count].BootIndicator = (PartitionSector->Partition[i].BootFlags & 0x80)?TRUE:FALSE; - LayoutBuffer->PartitionEntry[Count].RecognizedPartition = - IsRecognizedPartition (PartitionSector->Partition[i].PartitionType); LayoutBuffer->PartitionEntry[Count].RewritePartition = FALSE; DPRINT(" %ld: nr: %d boot: %1x type: %x start: 0x%I64x count: 0x%I64x rec: %d\n",