diff options
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 525ed3a..72a8b14 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -714,6 +714,7 @@ def action_setup_show(): @login_required def action_setup_modify(): form = SetupForm(request.form) + MIN_EFI_SIZE = 500 if form.validate(): cache_count = 0 for partition in form.partitions: @@ -724,6 +725,10 @@ def action_setup_modify(): flash(_('The EFI partition requires a FAT32 filesystem'), category='error') return redirect(url_for('commands')) + if partition.part_type.data == 'EFI' and partition.size.data < MIN_EFI_SIZE: + flash(_(f'The EFI partition requires a size of {MIN_EFI_SIZE}MiB or higher'), category='error') + return redirect(url_for('commands')) + if partition.size.data <= 0: flash(_('Partitions can\'t have a size of zero or lower'), category='error') return redirect(url_for('commands')) |