Fix attribute on expression error
@@ -60,14 +60,18 @@ fn parse_to_config(cfg: &mut BootloaderConfig, table: &toml::value::Table) {
}
("physical-memory-offset", Value::String(s)) => {
#[cfg(feature = "map_physical_memory")]
+ {
cfg.physical_memory_offset = Some(parse_aligned_addr(key.as_str(), &s));
+ }
#[cfg(not(feature = "map_physical_memory"))]
+ {
panic!(
"`physical-memory-offset` is only supported when the `map_physical_memory` \
feature of the crate is enabled"
);
}
+ }
("kernel-stack-size", Value::Integer(i)) => {
if i <= 0 {
panic!("`kernel-stack-size` in kernel manifest must be positive");
