X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Fcli_readline.c;h=6ef7a3e564254233c9d08dd29a950f4040f707ce;hb=548ce227d3d852455c6395c0cec30af0cda77b09;hp=ecded11ca3985f27b132ef4d20f7e79ee02c8379;hpb=c98b171e1098f94b2ff7720c45a25a602882f876;p=oweals%2Fu-boot.git diff --git a/common/cli_readline.c b/common/cli_readline.c index ecded11ca3..6ef7a3e564 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -5,13 +6,12 @@ * Add to readline cmdline-editing by * (C) Copyright 2005 * JinHua Luo, GuangDong Linux Center, - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -274,6 +274,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; @@ -566,12 +570,6 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, return -2; /* timed out */ WATCHDOG_RESET(); /* Trigger watchdog, if needed */ -#ifdef CONFIG_SHOW_ACTIVITY - while (!tstc()) { - show_activity(0); - WATCHDOG_RESET(); - } -#endif c = getc(); /*