1
0
Fork 0

firmware: improve RTIO map error reporting

This commit is contained in:
Sebastien Bourdeauducq 2023-04-04 11:17:26 +08:00
parent b747abe83c
commit 271a1adb04
1 changed files with 3 additions and 3 deletions

View File

@ -535,8 +535,8 @@ fn read_device_map(cfg: &Config) -> BTreeMap<u32, String> {
let channel = bytes_cr.read_u32().unwrap();
let device_name = bytes_cr.read_string().unwrap();
if let Some(old_entry) = device_map.insert(channel, device_name.clone()) {
error!(
"read_device_map: conflicting entries for channel {}: `{}` and `{}`",
warn!(
"conflicting device map entries for RTIO channel {}: '{}' and '{}'",
channel, old_entry, device_name
);
}
@ -544,7 +544,7 @@ fn read_device_map(cfg: &Config) -> BTreeMap<u32, String> {
Ok(())
})
.or_else(|err| {
error!("read_device_map: error reading `device_map` from config: {}", err);
warn!("error reading device map ({}), device names will not be available in RTIO error messages", err);
Err(err)
});
device_map