aboutsummaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-12 20:26:32 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-12 20:26:32 +0000
commit7467c8d3b6a50e2cbd8db750963d40b420ad38d1 (patch)
tree10dcece1e0bb88e35aa95c3a68896ad426e43f7a /shell/msh.c
parentf69bfc76fa7acb0c87fa3f3b319fde361a8315a8 (diff)
downloadbusybox-7467c8d3b6a50e2cbd8db750963d40b420ad38d1.tar.gz
Patch from vodz:
Changed email address cmdedit API change optimizations for traceroute and md5sum added a new shared create_icmp_socket() function
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 230d74f5a..8f046e794 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -682,8 +682,7 @@ static void * brkaddr;
#ifdef BB_FEATURE_COMMAND_EDITING
-char * current_prompt;
-unsigned int shell_context;
+static char * current_prompt;
#endif
@@ -4449,9 +4448,7 @@ register struct ioarg *ap;
if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) {
if (i)
lseek(ap->afile, ap->afpos, 0);
- do {
- i = read(ap->afile, bp->buf, sizeof(bp->buf));
- } while (i < 0 && errno == EINTR);
+ i = safe_read(ap->afile, bp->buf, sizeof(bp->buf));
if (i <= 0) {
closef(ap->afile);
return 0;
@@ -4470,7 +4467,6 @@ register struct ioarg *ap;
while (size == 0 || position >= size) {
cmdedit_read_input(current_prompt, mycommand);
- cmdedit_terminate();
size = strlen(mycommand);
position = 0;
}
@@ -4480,9 +4476,7 @@ register struct ioarg *ap;
} else
#endif
{
- do {
- i = read(ap->afile, &c, sizeof(c));
- } while (i < 0 && errno == EINTR);
+ i = safe_read(ap->afile, &c, sizeof(c));
return(i == sizeof(c)? c&0177: (closef(ap->afile), 0));
}
}