diff options
author | Stefan Roese <sr@denx.de> | 2006-08-07 15:08:44 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2006-08-07 15:08:44 +0200 |
commit | d8f961bbdaeef4dc1af7a01e297bf2d7e25ae227 (patch) | |
tree | 6ca6dd935e52d58342abc3f76eb2d4277967f6c1 /common/main.c | |
parent | 4f92ed5fc083631ac7aef6c027cdf1177befd204 (diff) | |
download | u-boot-d8f961bbdaeef4dc1af7a01e297bf2d7e25ae227.tar.gz u-boot-d8f961bbdaeef4dc1af7a01e297bf2d7e25ae227.tar.xz u-boot-d8f961bbdaeef4dc1af7a01e297bf2d7e25ae227.zip |
Fix control-c handing in CONFIG_CMDLINE_EDITING
Properly pass break code back from readline.
Patch by Roger Blofeld, 31 Jul 2006
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c index 3788bd5e4a..13d12a4308 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 */ |