]> git.proxmox.com Git - pve-installer.git/commitdiff
tui: bootdisk zfs config: add a maximum value to the `copies` option
authorStefan Sterz <s.sterz@proxmox.com>
Fri, 17 Nov 2023 16:32:18 +0000 (17:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 Nov 2023 16:40:30 +0000 (17:40 +0100)
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>
proxmox-tui-installer/src/views/bootdisk.rs

index 00e6ade9716a2f100dc4b9a0fffd87257b6cb417..7e13e91f7adf88d2065b85d17e3d1972e2ac9478 100644 (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",