mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
ReturnRecognizedPartitions in HalIoReadPartitionTable means that used and real partitions should be returned.
svn path=/trunk/; revision=17485
This commit is contained in:
parent
b3f11cfb38
commit
4a6a7d1ccc
1 changed files with 7 additions and 4 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue