From cf20d6495bc72578fb2ba89509fd85b867c85aa7 Mon Sep 17 00:00:00 2001 From: dalto Date: Sat, 13 Nov 2021 10:43:07 -0600 Subject: [PATCH] [partition] Ensure format is selected for existing zfs partitions --- src/modules/partition/gui/EditExistingPartitionDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index 04b9527f1..a3052b3b7 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -120,6 +120,12 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, m_ui->fileSystemLabel->setEnabled( m_ui->formatRadioButton->isChecked() ); m_ui->fileSystemComboBox->setEnabled( m_ui->formatRadioButton->isChecked() ); + // Force a format if the existing device is a zfs device since reusing a zpool isn't currently supported + m_ui->formatRadioButton->setChecked( m_partition->fileSystem().type() == FileSystem::Type::Zfs ); + m_ui->formatRadioButton->setEnabled( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); + m_ui->keepRadioButton->setChecked( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); + m_ui->keepRadioButton->setEnabled( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); + setFlagList( *( m_ui->m_listFlags ), m_partition->availableFlags(), PartitionInfo::flags( m_partition ) ); }