[pbs-devel] [PATCH v4 proxmox-backup 2/3] node: status: added bootmode

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Nov 27 14:53:53 CET 2023


On Mon, Nov 27, 2023 at 02:28:14PM +0100, Gabriel Goller wrote:
> Thanks for the review!
> 
> On 11/27/23 14:10, Wolfgang Bumiller wrote:
> > On Mon, Nov 27, 2023 at 11:52:37AM +0100, Gabriel Goller wrote:
> > > +
> > > +#[api]
> > > +#[derive(Serialize, Deserialize, Default)]
> > And Clone + Copy
> Agree
> > > +#[serde(rename_all = "kebab-case")]
> > > +/// The possible BootModes
> > > +pub enum BootMode {
> > > +    /// The BootMode is EFI/UEFI
> > > +    Efi,
> > > +    /// The BootMode is Legacy BIOS
> > > +    #[default]
> > ^ do we *need* Default on this type? And why is Bios the default?
> Removed it. Was enabled on the `NodeStatus` struct and cascaded down, but
> afaik we can remove it
> on the `NodeStatus` struct as well and get rid of it.

IMO this is one of those options where we can't have a default, so if a
struct containing it needs to be Default, this value should be an
Option<> in there instead.





More information about the pbs-devel mailing list