forked from M-Labs/artiq-zynq
firmware: improve RTIO map error reporting
This commit is contained in:
parent
b747abe83c
commit
271a1adb04
|
@ -535,8 +535,8 @@ fn read_device_map(cfg: &Config) -> BTreeMap<u32, String> {
|
||||||
let channel = bytes_cr.read_u32().unwrap();
|
let channel = bytes_cr.read_u32().unwrap();
|
||||||
let device_name = bytes_cr.read_string().unwrap();
|
let device_name = bytes_cr.read_string().unwrap();
|
||||||
if let Some(old_entry) = device_map.insert(channel, device_name.clone()) {
|
if let Some(old_entry) = device_map.insert(channel, device_name.clone()) {
|
||||||
error!(
|
warn!(
|
||||||
"read_device_map: conflicting entries for channel {}: `{}` and `{}`",
|
"conflicting device map entries for RTIO channel {}: '{}' and '{}'",
|
||||||
channel, old_entry, device_name
|
channel, old_entry, device_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -544,7 +544,7 @@ fn read_device_map(cfg: &Config) -> BTreeMap<u32, String> {
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.or_else(|err| {
|
.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)
|
Err(err)
|
||||||
});
|
});
|
||||||
device_map
|
device_map
|
||||||
|
|
Loading…
Reference in New Issue