[partition] Convert option struct to use the enum
This commit is contained in:
parent
2ae02bedf8
commit
9c3f576cd2
@ -169,7 +169,8 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
|
|||||||
lastSectorForRoot -= suggestedSwapSizeB / sectorSize + 1;
|
lastSectorForRoot -= suggestedSwapSizeB / sectorSize + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
core->layoutApply( dev, firstFreeSector, lastSectorForRoot, o.luksFsType, o.luksPassphrase );
|
// TODO: LUKS
|
||||||
|
core->layoutApply( dev, firstFreeSector, lastSectorForRoot, Config::luksGenerationNames().find(o.luksFsType), o.luksPassphrase );
|
||||||
|
|
||||||
if ( shouldCreateSwap )
|
if ( shouldCreateSwap )
|
||||||
{
|
{
|
||||||
@ -194,7 +195,7 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
|
|||||||
QStringLiteral( "swap" ),
|
QStringLiteral( "swap" ),
|
||||||
lastSectorForRoot + 1,
|
lastSectorForRoot + 1,
|
||||||
dev->totalLogical() - 1,
|
dev->totalLogical() - 1,
|
||||||
Config::luksGenerationNames().find(o.luksFsType, Config::LuksGeneration::Luks1),
|
o.luksFsType,
|
||||||
o.luksPassphrase,
|
o.luksPassphrase,
|
||||||
KPM_PARTITION_FLAG( None ) );
|
KPM_PARTITION_FLAG( None ) );
|
||||||
}
|
}
|
||||||
@ -245,7 +246,8 @@ doReplacePartition( PartitionCoreModule* core, Device* dev, Partition* partition
|
|||||||
core->deletePartition( dev, partition );
|
core->deletePartition( dev, partition );
|
||||||
}
|
}
|
||||||
|
|
||||||
core->layoutApply( dev, firstSector, lastSector, o.luksFsType, o.luksPassphrase );
|
// TODO: LUKS
|
||||||
|
core->layoutApply( dev, firstSector, lastSector, Config::luksGenerationNames().find(o.luksFsType), o.luksPassphrase );
|
||||||
|
|
||||||
core->dumpQueue();
|
core->dumpQueue();
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,12 @@ struct ReplacePartitionOptions
|
|||||||
{
|
{
|
||||||
QString defaultPartitionTableType; // e.g. "gpt" or "msdos"
|
QString defaultPartitionTableType; // e.g. "gpt" or "msdos"
|
||||||
QString defaultFsType; // e.g. "ext4" or "btrfs"
|
QString defaultFsType; // e.g. "ext4" or "btrfs"
|
||||||
QString luksFsType; // optional ("luks", "luks2")
|
Config::LuksGeneration luksFsType = Config::LuksGeneration::Luks1; // optional ("luks", "luks2")
|
||||||
QString luksPassphrase; // optional
|
QString luksPassphrase; // optional
|
||||||
|
|
||||||
ReplacePartitionOptions( const QString& pt,
|
ReplacePartitionOptions( const QString& pt,
|
||||||
const QString& fs,
|
const QString& fs,
|
||||||
const QString& luksFs,
|
Config::LuksGeneration luksFs,
|
||||||
const QString& luksPassphrase )
|
const QString& luksPassphrase )
|
||||||
: defaultPartitionTableType( pt )
|
: defaultPartitionTableType( pt )
|
||||||
, defaultFsType( fs )
|
, defaultFsType( fs )
|
||||||
@ -54,7 +54,7 @@ struct AutoPartitionOptions : ReplacePartitionOptions
|
|||||||
|
|
||||||
AutoPartitionOptions( const QString& pt,
|
AutoPartitionOptions( const QString& pt,
|
||||||
const QString& fs,
|
const QString& fs,
|
||||||
const QString& luksFs,
|
Config::LuksGeneration luksFs,
|
||||||
const QString& luksPassphrase,
|
const QString& luksPassphrase,
|
||||||
const QString& efi,
|
const QString& efi,
|
||||||
qint64 requiredBytes,
|
qint64 requiredBytes,
|
||||||
|
@ -496,7 +496,8 @@ ChoicePage::applyActionChoice( InstallChoice choice )
|
|||||||
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
||||||
PartitionActions::Choices::AutoPartitionOptions options { gs->value( "defaultPartitionTableType" ).toString(),
|
PartitionActions::Choices::AutoPartitionOptions options { gs->value( "defaultPartitionTableType" ).toString(),
|
||||||
m_config->eraseFsType(),
|
m_config->eraseFsType(),
|
||||||
gs->value( "luksFileSystemType" ).toString(),
|
// TODO: LUKS
|
||||||
|
Config::luksGenerationNames().find(gs->value( "luksFileSystemType" ).toString(), Config::LuksGeneration::Luks1),
|
||||||
m_encryptWidget->passphrase(),
|
m_encryptWidget->passphrase(),
|
||||||
gs->value( "efiSystemPartition" ).toString(),
|
gs->value( "efiSystemPartition" ).toString(),
|
||||||
CalamaresUtils::GiBtoBytes(
|
CalamaresUtils::GiBtoBytes(
|
||||||
@ -861,7 +862,8 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
|||||||
selectedPartition,
|
selectedPartition,
|
||||||
{ gs->value( "defaultPartitionType" ).toString(),
|
{ gs->value( "defaultPartitionType" ).toString(),
|
||||||
gs->value( "defaultFileSystemType" ).toString(),
|
gs->value( "defaultFileSystemType" ).toString(),
|
||||||
gs->value( "luksFileSystemType" ).toString(),
|
// TODO: LUKS
|
||||||
|
Config::luksGenerationNames().find(gs->value( "luksFileSystemType" ).toString(), Config::LuksGeneration::Luks1),
|
||||||
m_encryptWidget->passphrase() } );
|
m_encryptWidget->passphrase() } );
|
||||||
Partition* homePartition = findPartitionByPath( { selectedDevice() }, *homePartitionPath );
|
Partition* homePartition = findPartitionByPath( { selectedDevice() }, *homePartitionPath );
|
||||||
|
|
||||||
|
@ -90,7 +90,8 @@ ReplaceWidget::applyChanges()
|
|||||||
partition,
|
partition,
|
||||||
{ gs->value( "defaultPartitionTableType" ).toString(),
|
{ gs->value( "defaultPartitionTableType" ).toString(),
|
||||||
gs->value( "defaultFileSystemType" ).toString(),
|
gs->value( "defaultFileSystemType" ).toString(),
|
||||||
gs->value( "luksFileSystemType" ).toString(),
|
// TODO: LUKS
|
||||||
|
Config::luksGenerationNames().find(gs->value( "luksFileSystemType" ).toString(), Config::LuksGeneration::Luks1),
|
||||||
QString() } );
|
QString() } );
|
||||||
|
|
||||||
if ( m_isEfi )
|
if ( m_isEfi )
|
||||||
|
Loading…
Reference in New Issue
Block a user