cargo_image_runner/bootloader/
grub.rs1use super::{Bootloader, BootloaderFiles, ConfigFile};
2use crate::config::BootType;
3use crate::core::context::Context;
4use crate::core::error::Result;
5
6pub struct GrubBootloader;
11
12impl GrubBootloader {
13 pub fn new() -> Self {
15 Self
16 }
17}
18
19impl Default for GrubBootloader {
20 fn default() -> Self {
21 Self::new()
22 }
23}
24
25impl Bootloader for GrubBootloader {
26 fn prepare(&self, _ctx: &Context) -> Result<BootloaderFiles> {
27 Ok(BootloaderFiles::new())
33 }
34
35 fn config_files(&self, _ctx: &Context) -> Result<Vec<ConfigFile>> {
36 Ok(Vec::new())
39 }
40
41 fn boot_type(&self) -> BootType {
42 BootType::Hybrid
44 }
45
46 fn name(&self) -> &str {
47 "GRUB"
48 }
49}