diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-19 16:34:39 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-19 16:34:39 +0200 |
commit | aaa22d2493365ac97af0f4c72daf04b87f4b82cc (patch) | |
tree | 606419a27490c84641f73afc3b95d94bb69d8407 /shell | |
parent | 36df04837ad54a4eb559e5c69a81aeeb4d981a72 (diff) | |
download | busybox-w32-aaa22d2493365ac97af0f4c72daf04b87f4b82cc.tar.gz busybox-w32-aaa22d2493365ac97af0f4c72daf04b87f4b82cc.tar.bz2 busybox-w32-aaa22d2493365ac97af0f4c72daf04b87f4b82cc.zip |
hush: use configured max line length, not BUFSIZE from libc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index 69a86b14c..ae08c7326 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -556,7 +556,7 @@ struct globals { | |||
556 | unsigned long memleak_value; | 556 | unsigned long memleak_value; |
557 | int debug_indent; | 557 | int debug_indent; |
558 | #endif | 558 | #endif |
559 | char user_input_buf[ENABLE_FEATURE_EDITING ? BUFSIZ : 2]; | 559 | char user_input_buf[ENABLE_FEATURE_EDITING ? CONFIG_FEATURE_EDITING_MAX_LEN : 2]; |
560 | }; | 560 | }; |
561 | #define G (*ptr_to_globals) | 561 | #define G (*ptr_to_globals) |
562 | /* Not #defining name to G.name - this quickly gets unwieldy | 562 | /* Not #defining name to G.name - this quickly gets unwieldy |
@@ -1666,7 +1666,7 @@ static void get_user_input(struct in_str *i) | |||
1666 | G.flag_SIGINT = 0; | 1666 | G.flag_SIGINT = 0; |
1667 | /* buglet: SIGINT will not make new prompt to appear _at once_, | 1667 | /* buglet: SIGINT will not make new prompt to appear _at once_, |
1668 | * only after <Enter>. (^C will work) */ | 1668 | * only after <Enter>. (^C will work) */ |
1669 | r = read_line_input(prompt_str, G.user_input_buf, BUFSIZ-1, G.line_input_state); | 1669 | r = read_line_input(prompt_str, G.user_input_buf, CONFIG_FEATURE_EDITING_MAX_LEN-1, G.line_input_state); |
1670 | /* catch *SIGINT* etc (^C is handled by read_line_input) */ | 1670 | /* catch *SIGINT* etc (^C is handled by read_line_input) */ |
1671 | check_and_run_traps(0); | 1671 | check_and_run_traps(0); |
1672 | } while (r == 0 || G.flag_SIGINT); /* repeat if ^C or SIGINT */ | 1672 | } while (r == 0 || G.flag_SIGINT); /* repeat if ^C or SIGINT */ |