sim: Rename `SimFlashMap` to `SimMultiFlash`
The name `SimFlashMap` is a bit misleading, as the Map part is more of
an implementation detail when the type really just represents multiple
flash devices.
This is just a rename, but the names `SimFlashMap` and the value
`flashmap` occur in a lot of places in the image module.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/mcuboot-sys/src/c.rs b/sim/mcuboot-sys/src/c.rs
index ab5548f..d53dc23 100644
--- a/sim/mcuboot-sys/src/c.rs
+++ b/sim/mcuboot-sys/src/c.rs
@@ -1,7 +1,7 @@
/// Interface wrappers to C API entering to the bootloader
use crate::area::AreaDesc;
-use simflash::SimFlashMap;
+use simflash::SimMultiFlash;
use lazy_static::lazy_static;
use libc;
use crate::api;
@@ -14,12 +14,12 @@
}
/// Invoke the bootloader on this flash device.
-pub fn boot_go(flashmap: &mut SimFlashMap, areadesc: &AreaDesc,
+pub fn boot_go(multiflash: &mut SimMultiFlash, areadesc: &AreaDesc,
counter: Option<&mut i32>, catch_asserts: bool) -> (i32, u8) {
let _lock = BOOT_LOCK.lock().unwrap();
unsafe {
- for (&dev_id, flash) in flashmap.iter_mut() {
+ for (&dev_id, flash) in multiflash.iter_mut() {
api::set_flash(dev_id, flash);
}
raw::c_catch_asserts = if catch_asserts { 1 } else { 0 };
@@ -33,7 +33,7 @@
let asserts = unsafe { raw::c_asserts };
unsafe {
counter.map(|c| *c = raw::flash_counter as i32);
- for (&dev_id, _) in flashmap {
+ for (&dev_id, _) in multiflash {
api::clear_flash(dev_id);
}
};