console_countdown: ignore errors in getchar()
The getchar() call may return an error reported as a -1, e.g. when the
console detects a RATP message and switches to RATP mode.

In general it probably is a good idea to ignore these errors in the
console countdown operation; and in particular for the RATP usecase,
this also prevents from interfering with the countdown and menu just
when switching one of the consoles to RATP mode.

As a hint, this is what the standard console was printing due to this
issue when the RATP console was activated:

   Hit m for menu or any other key to stop autoboot: [: missing `]'

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b2ac13f commit 0b8f3441aa032b69770f59cafc37087a6d505cee
@Aleksander Morgado Aleksander Morgado authored on 20 Sep 2017
Sascha Hauer committed on 26 Sep 2017
Showing 1 changed file
View
common/console_countdown.c