mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 18:42:21 +00:00
feat(boot): add the bls-strict-mode option
Add --bls-strict-mode and bls-strict-mode in the options of sprout.toml. It does nothing yet; the behaviors it controls follow.
This commit is contained in:
1 parent
bfca43fe07
commit
7e1207097b
3 files changed
+30
No files matched your search
@@ -91,6 +91,12 @@ pub struct OptionsConfiguration {
|
||||
/// Enables autoconfiguration of Sprout based on the environment.
|
||||
#[serde(default)]
|
||||
pub autoconfigure: bool,
|
||||
/// Makes Sprout follow the Boot Loader Specification and systemd-boot exactly where it
|
||||
/// otherwise differs for convenience or safety. For example, the extended boot loader
|
||||
/// partition is always read, a one-shot entry only sets the default entry, and entries with
|
||||
/// missing files are hidden. See the README for everything it changes.
|
||||
#[serde(rename = "bls-strict-mode", default)]
|
||||
pub bls_strict_mode: bool,
|
||||
}
|
||||
|
||||
/// The default configuration, which matches an empty configuration file.
|
||||
@@ -118,6 +124,7 @@ impl Default for OptionsConfiguration {
|
||||
menu_timeout: None,
|
||||
menu_style: Default::default(),
|
||||
autoconfigure: false,
|
||||
bls_strict_mode: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,6 +171,12 @@ mod tests {
|
||||
assert_eq!(default.options.autoconfigure, empty.options.autoconfigure);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bls_strict_mode_is_off_by_default() {
|
||||
assert!(!RootConfiguration::default().options.bls_strict_mode);
|
||||
assert!(!empty().options.bls_strict_mode);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn menu_timeout_is_unset_by_default() {
|
||||
assert_eq!(RootConfiguration::default().options.menu_timeout, None);
|
||||
|
||||
Reference in new issue
Block a user