[pbs-devel] [PATCH v2 proxmox{-backup, } 0/3] Add boot_mode, improve kernel version

Gabriel Goller g.goller at proxmox.com
Mon Nov 27 09:41:19 CET 2023


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.





More information about the pbs-devel mailing list