From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A38CD1FF3A0 for ; Thu, 13 Jun 2024 13:52:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AE6B01F847; Thu, 13 Jun 2024 13:53:27 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 13 Jun 2024 13:53:11 +0200 Message-ID: <20240613115318.842583-3-c.heiss@proxmox.com> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240613115318.842583-1-c.heiss@proxmox.com> References: <20240613115318.842583-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.013 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH installer 2/4] tui: bootdisk: align btrfs dialog interface with zfs equivalent X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs index 1c7b2a4..29a2854 100644 --- a/proxmox-tui-installer/src/views/bootdisk.rs +++ b/proxmox-tui-installer/src/views/bootdisk.rs @@ -158,7 +158,7 @@ impl AdvancedBootdiskOptionsView { view.add_child(ZfsBootdiskOptionsView::new(runinfo, zfs, &product_conf)) } AdvancedBootdiskOptions::Btrfs(btrfs) => { - view.add_child(BtrfsBootdiskOptionsView::new(&runinfo.disks, btrfs)) + view.add_child(BtrfsBootdiskOptionsView::new(runinfo, btrfs)) } }; @@ -210,7 +210,7 @@ impl AdvancedBootdiskOptionsView { &product_conf, )), FsType::Btrfs(_) => { - view.add_child(BtrfsBootdiskOptionsView::new_with_defaults(&runinfo.disks)) + view.add_child(BtrfsBootdiskOptionsView::new_with_defaults(&runinfo)) } } } @@ -520,9 +520,9 @@ struct BtrfsBootdiskOptionsView { } impl BtrfsBootdiskOptionsView { - fn new(disks: &[Disk], options: &BtrfsBootdiskOptions) -> Self { + fn new(runinfo: &RuntimeInfo, options: &BtrfsBootdiskOptions) -> Self { let view = MultiDiskOptionsView::new( - disks, + &runinfo.disks, &options.selected_disks, FormView::new().child("hdsize", DiskSizeEditView::new().content(options.disk_size)), ) @@ -531,8 +531,11 @@ impl BtrfsBootdiskOptionsView { Self { view } } - fn new_with_defaults(disks: &[Disk]) -> Self { - Self::new(disks, &BtrfsBootdiskOptions::defaults_from(disks)) + fn new_with_defaults(runinfo: &RuntimeInfo) -> Self { + Self::new( + runinfo, + &BtrfsBootdiskOptions::defaults_from(&runinfo.disks), + ) } fn get_values(&mut self) -> Option<(Vec, BtrfsBootdiskOptions)> { -- 2.44.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel