diff --git a/sim/src/image.rs b/sim/src/image.rs index 3fa45530..b940b6e2 100644 --- a/sim/src/image.rs +++ b/sim/src/image.rs @@ -850,19 +850,13 @@ fn verify_image(flashmap: &SimFlashMap, slots: &[SlotInfo], slot: usize, } } -#[cfg(feature = "overwrite-only")] -#[allow(unused_variables)] -// overwrite-only doesn't employ trailer management fn verify_trailer(flashmap: &SimFlashMap, slots: &[SlotInfo], slot: usize, magic: Option, image_ok: Option, copy_done: Option) -> bool { - true -} + if Caps::OverwriteUpgrade.present() { + return true; + } -#[cfg(not(feature = "overwrite-only"))] -fn verify_trailer(flashmap: &SimFlashMap, slots: &[SlotInfo], slot: usize, - magic: Option, image_ok: Option, - copy_done: Option) -> bool { let offset = slots[slot].trailer_off; let dev_id = slots[slot].dev_id; let mut copy = vec![0u8; c::boot_magic_sz() + c::boot_max_align() * 2];