mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 14:51:44 +00:00
[SETUPLIB][USETUP] Some cleanup for partition code.
- Make the Create*Partition helpers take a size in bytes, not in sectors. This allows them to be easier to use by the caller, alleviating the need for making the size conversion into sectors. Instead it is done internally by the helpers. - Introduce helper macros to easily retrieve the size of a partition entry or a disk in bytes, from their internal representation in number of sectors. - The 'AutoCreate' variable being USETUP-specific, remove it from the PARTENTRY structure and use instead a flag set into the 'New' member. - Rename IsDiskSizeValid to IsPartitionLargeEnough, to better describe what the function is for.
This commit is contained in:
parent
b2ec78673d
commit
b7ad4a2298
5 changed files with 143 additions and 131 deletions
|
@ -806,12 +806,11 @@ CreateNTOSInstallationsList(
|
|||
|
||||
ASSERT(PartEntry->DiskEntry == DiskEntry);
|
||||
|
||||
DPRINT(" Primary Partition #%d, index %d - Type 0x%02x, IsLogical = %s, IsPartitioned = %s, IsNew = %s, AutoCreate = %s, FormatState = %lu -- Should I check it? %s\n",
|
||||
DPRINT(" Primary Partition #%d, index %d - Type 0x%02x, IsLogical = %s, IsPartitioned = %s, IsNew = %s, FormatState = %lu -- Should I check it? %s\n",
|
||||
PartEntry->PartitionNumber, PartEntry->PartitionIndex,
|
||||
PartEntry->PartitionType, PartEntry->LogicalPartition ? "TRUE" : "FALSE",
|
||||
PartEntry->IsPartitioned ? "TRUE" : "FALSE",
|
||||
PartEntry->New ? "Yes" : "No",
|
||||
PartEntry->AutoCreate ? "Yes" : "No",
|
||||
PartEntry->FormatState,
|
||||
ShouldICheckThisPartition(PartEntry) ? "YES!" : "NO!");
|
||||
|
||||
|
@ -828,12 +827,11 @@ CreateNTOSInstallationsList(
|
|||
|
||||
ASSERT(PartEntry->DiskEntry == DiskEntry);
|
||||
|
||||
DPRINT(" Logical Partition #%d, index %d - Type 0x%02x, IsLogical = %s, IsPartitioned = %s, IsNew = %s, AutoCreate = %s, FormatState = %lu -- Should I check it? %s\n",
|
||||
DPRINT(" Logical Partition #%d, index %d - Type 0x%02x, IsLogical = %s, IsPartitioned = %s, IsNew = %s, FormatState = %lu -- Should I check it? %s\n",
|
||||
PartEntry->PartitionNumber, PartEntry->PartitionIndex,
|
||||
PartEntry->PartitionType, PartEntry->LogicalPartition ? "TRUE" : "FALSE",
|
||||
PartEntry->IsPartitioned ? "TRUE" : "FALSE",
|
||||
PartEntry->New ? "Yes" : "No",
|
||||
PartEntry->AutoCreate ? "Yes" : "No",
|
||||
PartEntry->FormatState,
|
||||
ShouldICheckThisPartition(PartEntry) ? "YES!" : "NO!");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue