summaryrefslogtreecommitdiffstats
path: root/lib/readline_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline_simple.c')
-rw-r--r--lib/readline_simple.c5
1 files changed, 2 insertions, 3 deletions
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