mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +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) ||
|
if ((ReturnRecognizedPartitions == FALSE) ||
|
||||||
((ReturnRecognizedPartitions == TRUE) &&
|
((ReturnRecognizedPartitions == TRUE) &&
|
||||||
IsRecognizedPartition(PartitionSector->Partition[i].PartitionType)))
|
!IsContainerPartition(PartitionSector->Partition[i].PartitionType) &&
|
||||||
|
PartitionSector->Partition[i].PartitionType != PARTITION_ENTRY_UNUSED))
|
||||||
{
|
{
|
||||||
/* handle normal partition */
|
/* handle normal partition */
|
||||||
DPRINT("Partition %u: Normal Partition\n", i);
|
DPRINT("Partition %u: Normal Partition\n", i);
|
||||||
|
@ -936,13 +937,17 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
||||||
LayoutBuffer->PartitionEntry[Count].HiddenSectors =
|
LayoutBuffer->PartitionEntry[Count].HiddenSectors =
|
||||||
PartitionSector->Partition[i].StartingBlock;
|
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;
|
LayoutBuffer->PartitionEntry[Count].PartitionNumber = Number;
|
||||||
Number++;
|
Number++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LayoutBuffer->PartitionEntry[Count].RecognizedPartition = FALSE;
|
||||||
LayoutBuffer->PartitionEntry[Count].PartitionNumber = 0;
|
LayoutBuffer->PartitionEntry[Count].PartitionNumber = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,8 +955,6 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
||||||
PartitionSector->Partition[i].PartitionType;
|
PartitionSector->Partition[i].PartitionType;
|
||||||
LayoutBuffer->PartitionEntry[Count].BootIndicator =
|
LayoutBuffer->PartitionEntry[Count].BootIndicator =
|
||||||
(PartitionSector->Partition[i].BootFlags & 0x80)?TRUE:FALSE;
|
(PartitionSector->Partition[i].BootFlags & 0x80)?TRUE:FALSE;
|
||||||
LayoutBuffer->PartitionEntry[Count].RecognizedPartition =
|
|
||||||
IsRecognizedPartition (PartitionSector->Partition[i].PartitionType);
|
|
||||||
LayoutBuffer->PartitionEntry[Count].RewritePartition = FALSE;
|
LayoutBuffer->PartitionEntry[Count].RewritePartition = FALSE;
|
||||||
|
|
||||||
DPRINT(" %ld: nr: %d boot: %1x type: %x start: 0x%I64x count: 0x%I64x rec: %d\n",
|
DPRINT(" %ld: nr: %d boot: %1x type: %x start: 0x%I64x count: 0x%I64x rec: %d\n",
|
||||||
|
|
Loading…
Reference in a new issue