From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] console_countdown: Add CR as valid return key
Date: Mon, 10 Aug 2020 21:46:01 +0200 [thread overview]
Message-ID: <20200810194601.GE31536@pengutronix.de> (raw)
In-Reply-To: <20200716132753.16342-1-jmaselbas@kalray.eu>
Hi Jules,
On Thu, Jul 16, 2020 at 03:27:53PM +0200, Jules Maselbas wrote:
> Now both LF ('\n') and CR ('\r') are valid keys to abort
> console_countdown when using CONSOLE_COUNTDOWN_RETURN flag.
I have no problem with this change, but out of curiosity: In which case
do you need it?
Regards,
Sascha
>
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
> ---
> common/console_countdown.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/console_countdown.c b/common/console_countdown.c
> index 74dc38279..b92948f50 100644
> --- a/common/console_countdown.c
> +++ b/common/console_countdown.c
> @@ -64,7 +64,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;
> --
> 2.17.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-08-10 19:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 13:27 Jules Maselbas
2020-08-10 19:46 ` Sascha Hauer [this message]
2020-08-11 9:29 ` Jules Maselbas
2020-08-11 11:24 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200810194601.GE31536@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jmaselbas@kalray.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox