ReturnRecognizedPartitions in HalIoReadPartitionTable means that used and real partitions should be returned.

svn path=/trunk/; revision=17485
This commit is contained in:
Hartmut Birr 2005-08-23 17:43:58 +00:00
parent b3f11cfb38
commit 4a6a7d1ccc

View file

@ -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",