mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 20:24:26 +08: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
@ -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 New Issue
Block a user