[partition] Make new partition flags explicit

Suggested by aliveafter1000: having a default value, and then
filling in the default in one place it is used and not others,
is weird. Instead of dropping the one use, remove the default
value: partition flags are important enough to be explicit.
This commit is contained in:
Adriaan de Groot 2018-11-11 13:55:46 +01:00
parent 6ae7a6b470
commit 8144295e98
4 changed files with 33 additions and 13 deletions

View file

@ -204,7 +204,8 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
PartitionRole( PartitionRole::Primary ),
FileSystem::typeForName( defaultFsType ),
firstFreeSector,
lastSectorForRoot
lastSectorForRoot,
PartitionTable::FlagNone
);
}
else
@ -216,7 +217,8 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
FileSystem::typeForName( defaultFsType ),
firstFreeSector,
lastSectorForRoot,
luksPassphrase
luksPassphrase,
PartitionTable::FlagNone
);
}
PartitionInfo::setFormat( rootPartition, true );
@ -234,7 +236,8 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
PartitionRole( PartitionRole::Primary ),
FileSystem::LinuxSwap,
lastSectorForRoot + 1,
dev->totalLogical() - 1
dev->totalLogical() - 1,
PartitionTable::FlagNone
);
}
else
@ -246,7 +249,8 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
FileSystem::LinuxSwap,
lastSectorForRoot + 1,
dev->totalLogical() - 1,
luksPassphrase
luksPassphrase,
PartitionTable::FlagNone
);
}
PartitionInfo::setFormat( swapPartition, true );
@ -296,7 +300,8 @@ doReplacePartition( PartitionCoreModule* core,
newRoles,
FileSystem::typeForName( defaultFsType ),
partition->firstSector(),
partition->lastSector()
partition->lastSector(),
PartitionTable::FlagNone
);
}
else
@ -308,7 +313,8 @@ doReplacePartition( PartitionCoreModule* core,
FileSystem::typeForName( defaultFsType ),
partition->firstSector(),
partition->lastSector(),
luksPassphrase
luksPassphrase,
PartitionTable::FlagNone
);
}
PartitionInfo::setMountPoint( newPartition, "/" );