Reduce the number of bootenv vars

This commit is contained in:
2026-04-06 02:20:41 +08:00
parent f8db036a5f
commit 50d9440e0a
14 changed files with 455 additions and 93 deletions

View File

@@ -18,22 +18,6 @@ func (c BootEnvConfig) Validate() error {
return fmt.Errorf("invalid boot part %q", c.BootPart)
}
if c.BootDisk < 0 {
return fmt.Errorf("invalid boot disk %d", c.BootDisk)
}
if c.RootfsAPartNum <= 0 {
return fmt.Errorf("invalid rootfs A part %d", c.RootfsAPartNum)
}
if c.RootfsBPartNum <= 0 {
return fmt.Errorf("invalid rootfs B part %d", c.RootfsBPartNum)
}
if c.DataPartNum <= 0 {
return fmt.Errorf("invalid data part %d", c.DataPartNum)
}
if strings.TrimSpace(c.LinuxRootPrefix) == "" {
return fmt.Errorf("linux root prefix is required")
}
return nil
}