diff --git a/src/add-ons/disk_systems/intel/CreationParameterEditor.cpp b/src/add-ons/disk_systems/intel/CreationParameterEditor.cpp index 8d0c963692..881a6e07b9 100644 --- a/src/add-ons/disk_systems/intel/CreationParameterEditor.cpp +++ b/src/add-ons/disk_systems/intel/CreationParameterEditor.cpp @@ -18,14 +18,12 @@ PrimaryPartitionEditor::PrimaryPartitionEditor() : - BPartitionParameterEditor(), - fView(NULL), - fActiveCB(NULL), fParameters(NULL) { - fActiveCB = new BCheckBox("active", B_TRANSLATE("Active partition"), NULL); + fActiveCheckBox = new BCheckBox("active", B_TRANSLATE("Active partition"), + NULL); fView = new BGroupView(B_VERTICAL); - fView->AddChild(fActiveCB); + fView->AddChild(fActiveCheckBox); } @@ -44,12 +42,13 @@ PrimaryPartitionEditor::View() bool PrimaryPartitionEditor::FinishedEditing() { - if (fActiveCB->IsEnabled()) { - if (fActiveCB->Value() == B_CONTROL_ON) + if (fActiveCheckBox->IsEnabled()) { + if (fActiveCheckBox->Value() == B_CONTROL_ON) fParameters.SetTo("active true ;"); else fParameters.SetTo("active false ;"); - } else fParameters.SetTo(""); + } else + fParameters.SetTo(""); return true; } @@ -69,6 +68,6 @@ PrimaryPartitionEditor::GetParameters(BString* parameters) status_t PrimaryPartitionEditor::PartitionTypeChanged(const char* type) { - fActiveCB->SetEnabled(strcmp(type, kPartitionTypeIntelExtended) != 0); + fActiveCheckBox->SetEnabled(strcmp(type, kPartitionTypeIntelExtended) != 0); return B_OK; } diff --git a/src/add-ons/disk_systems/intel/CreationParameterEditor.h b/src/add-ons/disk_systems/intel/CreationParameterEditor.h index b31dc57122..ff2374db21 100644 --- a/src/add-ons/disk_systems/intel/CreationParameterEditor.h +++ b/src/add-ons/disk_systems/intel/CreationParameterEditor.h @@ -26,7 +26,7 @@ public: private: BView* fView; - BCheckBox* fActiveCB; + BCheckBox* fActiveCheckBox; BString fParameters; }; diff --git a/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp b/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp index 4840af16e2..4dc6b2a3f4 100644 --- a/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp +++ b/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp @@ -327,8 +327,10 @@ PartitionMapHandle::ValidateCreateChild(off_t* _offset, off_t* _size, if (!type.SetType(typeString) || type.IsEmpty()) return B_BAD_VALUE; - if (type.IsExtended() && fPartitionMap.ExtendedPartitionIndex() >= 0) + if (type.IsExtended() && fPartitionMap.ExtendedPartitionIndex() >= 0) { + // There can only be a single extended partition return B_BAD_VALUE; + } // check name if (name)