mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
cli: handle getch error
Handle getch error (when getch return 0x0) to avoid display issue in the console. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
273a12526c
commit
555e378ca7
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue