From: "Gaël PORTAY" <gael.portay@savoirfairelinux.com>
To: barebox@lists.infradead.org
Cc: "Gaël PORTAY" <gael.portay@savoirfairelinux.com>
Subject: [PATCH 0/2] readline_simple: return -1 if getc fails
Date: Mon, 7 Aug 2017 18:10:40 -0400 [thread overview]
Message-ID: <20170807221042.19700-1-gael.portay@savoirfairelinux.com> (raw)
Dear maintainers,
I came accross this issue when I was trying to add support for a new MIPS
board.
The getc() function from console_simple.c returns -EINVAL when no console is
registered.
It causes readline_simple to print a non-printable character (-EINVAL in this
case). Furthermore, it causes an infinite loop: readline never returns.
barebox:/ ���(...)���
With this patch, the error is no more explicit but the readline function stops
to print a dummy character and returns to shell.
barebox:/ <INTERRUPT>
barebox:/ <INTERRUPT>
barebox:/ <INTERRUPT>
(...)
barebox:/ <INTERRUPT>
barebox:/ <INTERRUPT>
barebox:/ <INTERRUPT>
The second patch is a simple cleanup of the in-file documentation.
Regards,
Gaël PORTAY (2):
readline_simple: return -1 if getc fails
readline_simple: remove obsolete documentation
lib/readline_simple.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
2.13.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2017-08-07 22:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 22:10 Gaël PORTAY [this message]
2017-08-07 22:10 ` [PATCH 1/2] " Gaël PORTAY
2017-08-08 7:51 ` Lucas Stach
2017-08-08 10:07 ` Ian Abbott
2017-08-08 15:21 ` Gaël PORTAY
2017-08-08 15:20 ` Gaël PORTAY
2017-08-08 15:36 ` Lucas Stach
2017-08-08 16:05 ` Ian Abbott
2017-08-08 16:49 ` Gaël PORTAY
2017-08-08 16:14 ` Gaël PORTAY
2017-08-07 22:10 ` [PATCH 2/2] readline_simple: remove obsolete documentation Gaël PORTAY
2017-08-09 4:13 [PATCH 0/2] readline_simple: return -1 if getc fails Gaël PORTAY
2017-08-09 6:05 ` Oleksij Rempel
2017-08-09 18:58 ` Gaël PORTAY
2017-08-09 19:41 ` Oleksij Rempel
2017-08-10 5:51 ` Antony Pavlov
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=20170807221042.19700-1-gael.portay@savoirfairelinux.com \
--to=gael.portay@savoirfairelinux.com \
--cc=barebox@lists.infradead.org \
/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