diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-08-16 17:25:43 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2017-08-16 17:25:43 +0200 |
commit | 33b3d7ab33598837b68661be3ca597e9d003f5f4 (patch) | |
tree | 099b943dbf40163795b4f8bdf65929b35834624d | |
parent | 2ee8b32a20d62483500c8c7e18902eca3f974f40 (diff) | |
parent | b77b68f9257d74d72c4ed528cc0aacd398499ead (diff) | |
download | barebox-33b3d7ab33598837b68661be3ca597e9d003f5f4.tar.gz barebox-33b3d7ab33598837b68661be3ca597e9d003f5f4.tar.xz |
Merge branch 'for-next/misc'
-rw-r--r-- | commands/loadxy.c | 4 | ||||
-rw-r--r-- | lib/readline_simple.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/commands/loadxy.c b/commands/loadxy.c index a2aab0fc85..2bfe482fc5 100644 --- a/commands/loadxy.c +++ b/commands/loadxy.c @@ -113,7 +113,7 @@ static int do_loady(int argc, char *argv[]) BAREBOX_CMD_HELP_START(loady) BAREBOX_CMD_HELP_TEXT("Options:") BAREBOX_CMD_HELP_OPT("-g", "use Y-Modem/G (use on lossless tty such as USB)") -BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate") +BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate)") BAREBOX_CMD_HELP_OPT("-t NAME", "console name to use (default: current)") BAREBOX_CMD_HELP_END @@ -221,7 +221,7 @@ BAREBOX_CMD_HELP_START(loadx) BAREBOX_CMD_HELP_TEXT("Options:") BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin") BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)") -BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate") +BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate)") BAREBOX_CMD_HELP_OPT("-t NAME", "console name to use (default: current)") BAREBOX_CMD_HELP_END diff --git a/lib/readline_simple.c b/lib/readline_simple.c index c4d3d240e5..80e075bc5c 100644 --- a/lib/readline_simple.c +++ b/lib/readline_simple.c @@ -35,11 +35,8 @@ static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen) /* * Prompt for input and read a line. - * If CONFIG_BOOT_RETRY_TIME is defined and retry_time >= 0, - * time out when time goes past endtime (timebase time in ticks). * Return: number of read characters * -1 if break - * -2 if timed out */ int readline (const char *prompt, char *line, int len) { @@ -58,6 +55,8 @@ int readline (const char *prompt, char *line, int len) for (;;) { c = getchar(); + if (c < 0) + return (-1); /* * Special character handling |