Skip to content

Commit

Permalink
** WIP ** Investigate whether it's good to reset the RewritePartition…
Browse files Browse the repository at this point in the history
… flag once the partition layout has been committed...
  • Loading branch information
HBelusca committed Oct 24, 2024
1 parent 36cd0cf commit a7834b3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions base/setup/lib/utils/partlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -3923,6 +3923,16 @@ WritePartitions(
DumpPartitionTable(DiskEntry);
#endif

#if 0 // TODO: Investigate whether this is really necessary??
{
ULONG i;
for (i = 0; i < DiskEntry->LayoutBuffer->PartitionCount; i++)
{
DiskEntry->LayoutBuffer->PartitionEntry[i].RewritePartition = FALSE;
}
}
#endif

/* Update the partition numbers and device names */

#if 0
Expand All @@ -3945,6 +3955,7 @@ WritePartitions(
if (PartEntry->New)
{
PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex];
/**/PartitionInfo->RewritePartition = FALSE;/**/
PartEntry->PartitionNumber = PartitionInfo->PartitionNumber;
InitPartitionDeviceName(PartEntry);
}
Expand All @@ -3963,6 +3974,7 @@ WritePartitions(
if (PartEntry->New)
{
PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex];
/**/PartitionInfo->RewritePartition = FALSE;/**/
PartEntry->PartitionNumber = PartitionInfo->PartitionNumber;
InitPartitionDeviceName(PartEntry);
}
Expand All @@ -3978,6 +3990,7 @@ WritePartitions(
// ASSERT(PartEntry->PartitionType != PARTITION_ENTRY_UNUSED);
PartEntry->New = FALSE;
PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex];
/**/PartitionInfo->RewritePartition = FALSE;/**/
PartEntry->PartitionNumber = PartitionInfo->PartitionNumber;
}
#endif
Expand Down

0 comments on commit a7834b3

Please sign in to comment.