projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
273a125
)
cli: handle getch error
author
Patrick Delaunay
<patrick.delaunay@st.com>
Fri, 3 Aug 2018 11:38:45 +0000
(13:38 +0200)
committer
Tom Rini
<trini@konsulko.com>
Tue, 11 Sep 2018 00:20:34 +0000
(20:20 -0400)
Handle getch error (when getch return 0x0) to avoid display issue
in the console.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
common/cli_readline.c
patch
|
blob
|
history
diff --git
a/common/cli_readline.c
b/common/cli_readline.c
index 60a232b065e821bd3294f10fa3b39b6daf99ad48..99b631720e17b02fdc41f524d7a733b19bb72750 100644
(file)
--- a/
common/cli_readline.c
+++ b/
common/cli_readline.c
@@
-273,6
+273,10
@@
static int cread_line(const char *const prompt, char *buf, unsigned int *len,
ichar = getcmd_getch();
+ /* ichar=0x0 when error occurs in U-Boot getc */
+ if (!ichar)
+ continue;
+
if ((ichar == '\n') || (ichar == '\r')) {
putc('\n');
break;