mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Also accept \n for "Please press Enter to activate ..."
Shouldn't be needed for real cases, but we have seen automated scripts send '\n' instead of '\r', or '\r' + '\n'. Signed-off-by: Jacques de Laval <Jacques.De.Laval@westermo.com>
This commit is contained in:
+1
-1
@@ -307,7 +307,7 @@ static int activate_console(int noclear, int nowait)
|
||||
|
||||
dprint(STDERR_FILENO, clr, strlen(clr));
|
||||
dprint(STDERR_FILENO, msg, strlen(msg));
|
||||
while ((rc = read(STDIN_FILENO, &c, 1)) > 0 && c != '\r')
|
||||
while ((rc = read(STDIN_FILENO, &c, 1)) > 0 && c != '\r' && c != '\n')
|
||||
continue;
|
||||
|
||||
/* On any error (likely EINTR), we avoid starting getty */
|
||||
|
||||
Reference in New Issue
Block a user