[pve-devel] [PATCH installer 3/3] only set hdsize when deviating from the maximum

Folke Gleumes f.gleumes at proxmox.com
Tue Nov 21 14:20:21 CET 2023


this prevents a lower hdsize to be set, when intermittently adding a
smaller storage device.

Signed-off-by: Folke Gleumes <f.gleumes at proxmox.com>
---
 proxinstall | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index 4fc31f8..695826d 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1409,7 +1409,10 @@ sub create_hdoption_view {
 
     my $tmp;
 
-    if (($tmp = &$get_float($spinbutton_hdsize)) && ($tmp != $hdsize)) {
+    if (
+	($tmp = &$get_float($spinbutton_hdsize)) && ($tmp != $hdsize)
+	&& ($tmp != $get_max_hdsize->())
+    ) {
 	Proxmox::Install::Config::set_hdsize($tmp);
     } else {
 	Proxmox::Install::Config::set_hdsize(undef);
-- 
2.39.2






More information about the pve-devel mailing list