[ext2fs] set a minimum ext partition size of 256 MB

* Not gonna bother with computing the effective minimum size so 256 MB will have to do.
* Closes #1576
This commit is contained in:
Pete Batard 2020-10-02 13:58:15 +01:00
parent 68a5a26956
commit e6ac3782fe
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
4 changed files with 21 additions and 7 deletions

View file

@ -671,7 +671,7 @@ void ToggleAdvancedFormatOptions(BOOL enable)
InvalidateRect(hMainDialog, NULL, TRUE);
}
// Toggle the display of peristence unit dropdown and resize the size field
// Toggle the display of persistence unit dropdown and resize the size field
void TogglePersistenceControls(BOOL display)
{
RECT rc;
@ -747,12 +747,15 @@ void SetPersistenceSize(void)
persistence_unit_selection = proposed_unit_selection;
IGNORE_RETVAL(ComboBox_SetCurSel(hCtrl, persistence_unit_selection));
if ((pos != 0) && (pos < MIN_EXT_SIZE))
pos = MIN_EXT_SIZE;
pos /= MB;
max /= MB;
for (i = 0; i < persistence_unit_selection; i++) {
pos /= 1024;
max /= 1024;
}
}
hCtrl = GetDlgItem(hMainDialog, IDC_PERSISTENCE_SLIDER);