fn detect_mode(cmdline: &MetalosCmdline) -> Result<BootMode> {
    // If we have been asked to reimage that takes priority over all other things
    if cmdline.root_disk_package.is_some() {
        Ok(BootMode::MetalOSReimage)
    } else if cmdline.host_config_uri.is_some() {
        Ok(BootMode::MetalOSExisting)
    } else {
        Ok(BootMode::Legacy)
    }
}
/// This functions job is to discover what type of boot we should be doing.
/// We want this to be the only place where this logic lives and we want very little
/// to no branching logic inside of the other generator methods
This functions job is to discover what type of boot we should be doing.
We want this to be the only place where this logic lives and we want very little
to no branching logic inside of the other generator methods
This functions job is to discover what type of boot we should be doing . We want this to be the only place where this logic lives and we want very little to no branching logic inside of the other generator methods
fn detect_mode(cmdline: &MetalosCmdline) -> Result<BootMode> {
    // If we have been asked to reimage that takes priority over all other things
    if cmdline.root_disk_package.is_some() {
        Ok(BootMode::MetalOSReimage)
    } else if cmdline.host_config_uri.is_some() {
        Ok(BootMode::MetalOSExisting)
    } else {
        Ok(BootMode::Legacy)
    }
}
fn detect_mode ( cmdline : & MetalosCmdline ) -> Result < BootMode > { // If we have been asked to reimage that takes priority over all other things if cmdline . root_disk_package . is_some ( ) { Ok ( BootMode :: MetalOSReimage ) } else if cmdline . host_config_uri . is_some ( ) { Ok ( BootMode :: MetalOSExisting ) } else { Ok ( BootMode :: Legacy ) } }
This functions job is to discover what type of boot we should be doing.
This functions job is to discover what type of boot we should be doing .
cmdline
&MetalosCmdline
cmdline
&MetalosCmdline