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: Cyril Brulebois <kibi@debian.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
parent
0d37f1be
Please register or sign in to comment