From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3DAF29E14B for ; Mon, 27 Nov 2023 09:41:51 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1701726AB for ; Mon, 27 Nov 2023 09:41:21 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 27 Nov 2023 09:41:20 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5521644A06 for ; Mon, 27 Nov 2023 09:41:20 +0100 (CET) Message-ID: <59e58a82-a881-4b95-8f8d-45669bbb12e1@proxmox.com> Date: Mon, 27 Nov 2023 09:41:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Thomas Lamprecht , Proxmox Backup Server development discussion , Lukas Wagner References: <20231124120228.180173-1-g.goller@proxmox.com> From: Gabriel Goller In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.219 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: Re: [pbs-devel] [PATCH v2 proxmox{-backup, } 0/3] Add boot_mode, improve kernel version X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2023 08:41:51 -0000 Thanks for the review! On 11/24/23 15:45, Thomas Lamprecht wrote: > Thanks for patch and review to both, but IMO this is still differing to much > from Proxmox VE's endpoint without any real justification? > > There the "boot-info" object with the required key "mode" and the optional > "secureboot" entry, that explicitly de-couples the general mode from some > mode-specific detail. > > The fitting rust struct (at least in sys) would be > > pub enum BootModeInformation { > /// The BootMode is EFI/UEFI, the boolean specifies if secure boot is enabled > Efi(bool), > /// The BootMode is Legacy BIOS > Bios, > } > > > or if one wants to be overly specific then something like: > > pub enum SecureBoot { > Enabled, > Disabled, > } > > > pub enum BootModeInformation { > /// The BootMode is EFI/UEFI > Efi(SecureBoot), > /// The BootMode is Legacy BIOS > Bios, > } > > (but could be overkill) > > It's not a hard must to keep this the same for pve-manager and pbs, but IMO > one should have very good reason for changing the format for relaying the > exact same information between two products, such inconsistencies make it > harder to interact with our API for any users, or external devs, and also > won't make it easier to reuse widgets for the (current or future) UIs.. Ok, I will implement this in v2. I think I'll choose the second one with the specific enum for `SecureBoot`. Will be more clear what is means (without looking at comments) + won't use more memory than the bool version.