summaryrefslogtreecommitdiffstats
path: root/common/console_countdown.c
Commit message (Collapse)AuthorAgeFilesLines
* console_countdown: Add pattern listSascha Hauer2019-04-241-1/+18
| | | | | | | This adds an optional string argument to console_countdown() which can hold a list of keys which also abort the countdown. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console_countdown: ignore errors in getchar()Aleksander Morgado2017-09-261-6/+8
| | | | | | | | | | | | | | | | | | 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>
* console_countdown: add possibility to abort countdown by external commandsMarc Kleine-Budde2017-03-101-0/+15
| | | | | | | | | | | This patch makes it possible to abort a console countdown by an external command, for example when fastboot is used. This requires additional modifications in the external commands, a call to "console_countdown_abort()" has to be inserted. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console_countdown: width to of countdown to 4 digitsMarc Kleine-Budde2017-03-101-2/+2
| | | | | | | | | This patch increases the displayed width of the countdown to 4 digits, otherwise waiting for more then 99 seconds doesn't look good. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stdio: rename getc to getcharSascha Hauer2016-04-151-1/+1
| | | | | | | The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* timeout: factor out wait-for-key-press loop into separate fileMarc Kleine-Budde2015-04-231-0/+67
This patch factors out the wait-for-key-press loop from the shell command "timeout" into a sparate file, so that it can be used from C, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>