public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Folke Gleumes <f.gleumes@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 3/3] only set hdsize when deviating from the maximum
Date: Tue, 21 Nov 2023 14:20:21 +0100	[thread overview]
Message-ID: <20231121132021.219504-3-f.gleumes@proxmox.com> (raw)
In-Reply-To: <20231121132021.219504-1-f.gleumes@proxmox.com>

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

Signed-off-by: Folke Gleumes <f.gleumes@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





      parent reply	other threads:[~2023-11-21 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 13:20 [pve-devel] [PATCH installer 1/3] perform early check on hdsize Folke Gleumes
2023-11-21 13:20 ` [pve-devel] [PATCH installer 2/3] set correct maximum for hdsize input Folke Gleumes
2023-11-21 13:20 ` Folke Gleumes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231121132021.219504-3-f.gleumes@proxmox.com \
    --to=f.gleumes@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal