Skip to content
Commit 1fda53e7 authored by Cyril Brulebois's avatar Cyril Brulebois
Browse files

Make sure not to look at past lines in dmesg (Closes: #779546).



If user supplies firmware on a USB stick, missing firmware detection
happens again, and if dmesg hasn't received enough lines to get rid of
old “firmware: failed to load” entries, the situation looks like it
hasn't improved.

To avoid such a loop, note the timestamp of the last dmesg line after
having scanned for such lines, and in case missing firmware detection
runs again, use this timestamp to filter out previous lines in case it's
still present in the new dmesg output; or use the whole dmesg output if
that timestamp has vanished.

Tested successfully on bare metal with iwlwifi, in 3 cases:
 - USB stick with firmware in place before boot: seamless.
 - USB stick with firmware plugged after the “search on removable media”
   prompt: OK.
 - USB stick with firmware not plugged after the first “search on
   removable media” prompt, but on the second try (so that there's a
   search that doesn't find anything): OK.

Tested-by: default avatarCyril Brulebois <kibi@debian.org>
Signed-off-by: default avatarCyril Brulebois <kibi@debian.org>
parent 0d37f1be
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment