aboutsummaryrefslogtreecommitdiff
path: root/msh.c
diff options
context:
space:
mode:
Diffstat (limited to 'msh.c')
-rw-r--r--msh.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/msh.c b/msh.c
index 230d74f5a..8f046e794 100644
--- a/msh.c
+++ b/msh.c
@@ -682,8 +682,7 @@ static void * brkaddr;
682 682
683 683
684#ifdef BB_FEATURE_COMMAND_EDITING 684#ifdef BB_FEATURE_COMMAND_EDITING
685char * current_prompt; 685static char * current_prompt;
686unsigned int shell_context;
687#endif 686#endif
688 687
689 688
@@ -4449,9 +4448,7 @@ register struct ioarg *ap;
4449 if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) { 4448 if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) {
4450 if (i) 4449 if (i)
4451 lseek(ap->afile, ap->afpos, 0); 4450 lseek(ap->afile, ap->afpos, 0);
4452 do { 4451 i = safe_read(ap->afile, bp->buf, sizeof(bp->buf));
4453 i = read(ap->afile, bp->buf, sizeof(bp->buf));
4454 } while (i < 0 && errno == EINTR);
4455 if (i <= 0) { 4452 if (i <= 0) {
4456 closef(ap->afile); 4453 closef(ap->afile);
4457 return 0; 4454 return 0;
@@ -4470,7 +4467,6 @@ register struct ioarg *ap;
4470 4467
4471 while (size == 0 || position >= size) { 4468 while (size == 0 || position >= size) {
4472 cmdedit_read_input(current_prompt, mycommand); 4469 cmdedit_read_input(current_prompt, mycommand);
4473 cmdedit_terminate();
4474 size = strlen(mycommand); 4470 size = strlen(mycommand);
4475 position = 0; 4471 position = 0;
4476 } 4472 }
@@ -4480,9 +4476,7 @@ register struct ioarg *ap;
4480 } else 4476 } else
4481#endif 4477#endif
4482 { 4478 {
4483 do { 4479 i = safe_read(ap->afile, &c, sizeof(c));
4484 i = read(ap->afile, &c, sizeof(c));
4485 } while (i < 0 && errno == EINTR);
4486 return(i == sizeof(c)? c&0177: (closef(ap->afile), 0)); 4480 return(i == sizeof(c)? c&0177: (closef(ap->afile), 0));
4487 } 4481 }
4488} 4482}