From ebe7e61355647c2cb3180e2795b922345c4571e3 Mon Sep 17 00:00:00 2001 From: Luke D Jones Date: Wed, 10 Mar 2021 16:30:42 +1300 Subject: [PATCH] Slightly change how module load error is reported --- daemon/src/ctrl_gfx/gfx.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/src/ctrl_gfx/gfx.rs b/daemon/src/ctrl_gfx/gfx.rs index a649e311..b2df2c18 100644 --- a/daemon/src/ctrl_gfx/gfx.rs +++ b/daemon/src/ctrl_gfx/gfx.rs @@ -293,9 +293,8 @@ impl CtrlGraphics { warn!("It may be safe to ignore the above error, run `lsmod |grep nvidia` to confirm modules loaded"); return Ok(()) } - let msg = format!("{} {} failed: {:?}", action, driver, String::from_utf8_lossy(&output.stderr)); - error!("{} {} try: {}: Error: {}", action, driver, count, msg); - if count == MAX_TRIES { + if count >= MAX_TRIES { + let msg = format!("{} {} failed: {:?}", action, driver, String::from_utf8_lossy(&output.stderr)); return Err(RogError::Modprobe(msg)); } }