kdb: Improve handling of characters from different input sources
authorDaniel Thompson <daniel.thompson@linaro.org>
Fri, 25 Oct 2019 07:33:27 +0000 (08:33 +0100)
committerDaniel Thompson <daniel.thompson@linaro.org>
Mon, 28 Oct 2019 12:08:10 +0000 (12:08 +0000)
commitcdca8d8900dd33ce6b8b526e247d2a6009d05de0
tree7933f560d51b2db626038fe5d85725657e272d58
parent4f27e824bf83dfc2f6dc1a54fae419be7cd335af
kdb: Improve handling of characters from different input sources

Currently if an escape timer is interrupted by a character from a
different input source then the new character is discarded and the
function returns '\e' (which will be discarded by the level above).
It is hard to see why this would ever be the desired behaviour.
Fix this to return the new character rather than the '\e'.

This is a bigger refactor than might be expected because the new
character needs to go through escape sequence detection.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20191025073328.643-5-daniel.thompson@linaro.org
kernel/debug/kdb/kdb_io.c