Slightly change how module load error is reported

This commit is contained in:
Luke D Jones
2021-03-10 16:30:42 +13:00
parent bda58c9695
commit ebe7e61355

View File

@@ -293,9 +293,8 @@ impl CtrlGraphics {
warn!("It may be safe to ignore the above error, run `lsmod |grep nvidia` to confirm modules loaded"); warn!("It may be safe to ignore the above error, run `lsmod |grep nvidia` to confirm modules loaded");
return Ok(()) return Ok(())
} }
let msg = format!("{} {} failed: {:?}", action, driver, String::from_utf8_lossy(&output.stderr)); if count >= MAX_TRIES {
error!("{} {} try: {}: Error: {}", action, driver, count, msg); let msg = format!("{} {} failed: {:?}", action, driver, String::from_utf8_lossy(&output.stderr));
if count == MAX_TRIES {
return Err(RogError::Modprobe(msg)); return Err(RogError::Modprobe(msg));
} }
} }