aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ef22da1b6..75bfbf115 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2589,9 +2589,7 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
2589/* ============ ... */ 2589/* ============ ... */
2590 2590
2591 2591
2592#define IBUFSIZ COMMON_BUFSIZE 2592#define IBUFSIZ (ENABLE_FEATURE_EDITING ? CONFIG_FEATURE_EDITING_MAX_LEN : 1024)
2593/* buffer for top level input file */
2594#define basebuf bb_common_bufsiz1
2595 2593
2596/* Syntax classes */ 2594/* Syntax classes */
2597#define CWORD 0 /* character is nothing special */ 2595#define CWORD 0 /* character is nothing special */
@@ -9447,12 +9445,12 @@ preadfd(void)
9447#if ENABLE_FEATURE_EDITING 9445#if ENABLE_FEATURE_EDITING
9448 retry: 9446 retry:
9449 if (!iflag || g_parsefile->fd != STDIN_FILENO) 9447 if (!iflag || g_parsefile->fd != STDIN_FILENO)
9450 nr = nonblock_safe_read(g_parsefile->fd, buf, BUFSIZ - 1); 9448 nr = nonblock_safe_read(g_parsefile->fd, buf, IBUFSIZ - 1);
9451 else { 9449 else {
9452#if ENABLE_FEATURE_TAB_COMPLETION 9450#if ENABLE_FEATURE_TAB_COMPLETION
9453 line_input_state->path_lookup = pathval(); 9451 line_input_state->path_lookup = pathval();
9454#endif 9452#endif
9455 nr = read_line_input(cmdedit_prompt, buf, BUFSIZ, line_input_state); 9453 nr = read_line_input(cmdedit_prompt, buf, IBUFSIZ, line_input_state);
9456 if (nr == 0) { 9454 if (nr == 0) {
9457 /* Ctrl+C pressed */ 9455 /* Ctrl+C pressed */
9458 if (trap[SIGINT]) { 9456 if (trap[SIGINT]) {
@@ -9469,7 +9467,7 @@ preadfd(void)
9469 } 9467 }
9470 } 9468 }
9471#else 9469#else
9472 nr = nonblock_safe_read(g_parsefile->fd, buf, BUFSIZ - 1); 9470 nr = nonblock_safe_read(g_parsefile->fd, buf, IBUFSIZ - 1);
9473#endif 9471#endif
9474 9472
9475#if 0 9473#if 0
@@ -12728,7 +12726,8 @@ static void
12728init(void) 12726init(void)
12729{ 12727{
12730 /* from input.c: */ 12728 /* from input.c: */
12731 basepf.next_to_pgetc = basepf.buf = basebuf; 12729 /* we will never free this */
12730 basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ);
12732 12731
12733 /* from trap.c: */ 12732 /* from trap.c: */
12734 signal(SIGCHLD, SIG_DFL); 12733 signal(SIGCHLD, SIG_DFL);