tui: bootdisk zfs config: add a maximum value to the copies option

according to `man zfsprops` the copies option can only be 1, 2, or 3.
limit the field to 3 just like we do for the GTK based UI, as setting
higher options can't work anyway.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
 [ TL: fleece in note that we already limit this in the GTK UI ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Stefan Sterz 2023-11-17 17:32:18 +01:00 committed by Thomas Lamprecht
parent 28a55aea9a
commit 851a1e98b2

View File

@ -592,7 +592,7 @@ impl ZfsBootdiskOptionsView {
.unwrap_or_default(),
),
)
.child("copies", IntegerEditView::new().content(options.copies))
.child("copies", IntegerEditView::new().content(options.copies).max_value(3))
.child_conditional(
is_pve,
"ARC max size",