mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00: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 parent
dc36b313ff
commit
2f5c00f2bd
1 file changed
+1
-1
+1
-1
@@ -307,7 +307,7 @@ static int activate_console(int noclear, int nowait)
|
|||||||
|
|
||||||
dprint(STDERR_FILENO, clr, strlen(clr));
|
dprint(STDERR_FILENO, clr, strlen(clr));
|
||||||
dprint(STDERR_FILENO, msg, strlen(msg));
|
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;
|
continue;
|
||||||
|
|
||||||
/* On any error (likely EINTR), we avoid starting getty */
|
/* On any error (likely EINTR), we avoid starting getty */
|
||||||
|
|||||||
Reference in new issue
Block a user