diff options
Diffstat (limited to 'common/console_countdown.c')
-rw-r--r-- | common/console_countdown.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/common/console_countdown.c b/common/console_countdown.c index 8d09894c30..e41641aca2 100644 --- a/common/console_countdown.c +++ b/common/console_countdown.c @@ -1,20 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * console_countdown - contdown on the console - interruptible by a keypress * * Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <clock.h> @@ -67,7 +55,7 @@ int console_countdown(int timeout_s, unsigned flags, const char *keys, goto out; if (flags & CONSOLE_COUNTDOWN_ANYKEY) goto out; - if (flags & CONSOLE_COUNTDOWN_RETURN && key == '\n') + if (flags & CONSOLE_COUNTDOWN_RETURN && (key == '\n' || key == '\r')) goto out; if (flags & CONSOLE_COUNTDOWN_CTRLC && key == 3) goto out; |