summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2006-08-22 10:17:59 -0500
committerJon Loeliger <jdl@freescale.com>2006-08-22 10:17:59 -0500
commit4b7576fb804f9aae275a9ad5d947d2eb727d8cb7 (patch)
tree56a964216b21901d6279069086f713170805864f /common/main.c
parent5de62c47a8628b3da4d73f7c07027f32a3342d40 (diff)
parent5196a7a03bc436435787e1ad7044af94d93a5448 (diff)
downloadu-boot-imx-4b7576fb804f9aae275a9ad5d947d2eb727d8cb7.zip
u-boot-imx-4b7576fb804f9aae275a9ad5d947d2eb727d8cb7.tar.gz
u-boot-imx-4b7576fb804f9aae275a9ad5d947d2eb727d8cb7.tar.bz2
Merge branch 'master' of http://www.denx.de/git/u-boot
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index 3788bd5..13d12a4 100644
--- a/common/main.c
+++ b/common/main.c
@@ -937,6 +937,7 @@ int readline (const char *const prompt)
#ifdef CONFIG_CMDLINE_EDITING
char *p = console_buffer;
unsigned int len=MAX_CMDBUF_SIZE;
+ int rc;
static int initted = 0;
if (!initted) {
@@ -946,8 +947,8 @@ int readline (const char *const prompt)
puts (prompt);
- cread_line(p, &len);
- return len;
+ rc = cread_line(p, &len);
+ return rc < 0 ? rc : len;
#else
char *p = console_buffer;
int n = 0; /* buffer index */