aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-05-08 21:21:10 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-05-08 21:21:10 +0200
commit80c5b6893d4708b3683ad9a51c990a326a8f1dff (patch)
tree0c4c3192e77e6afa1a1d47e750a0840d3a4ca60e /shell
parentb8709032a3fb57b3ec536bdf9b92b526ed63b995 (diff)
downloadbusybox-w32-80c5b6893d4708b3683ad9a51c990a326a8f1dff.tar.gz
busybox-w32-80c5b6893d4708b3683ad9a51c990a326a8f1dff.tar.bz2
busybox-w32-80c5b6893d4708b3683ad9a51c990a326a8f1dff.zip
libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c8
-rw-r--r--shell/shell_common.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index b50e0952e..b1b11bd1b 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5918,7 +5918,7 @@ expbackq(union node *cmd, int quoted, int quotes)
5918 read: 5918 read:
5919 if (in.fd < 0) 5919 if (in.fd < 0)
5920 break; 5920 break;
5921 i = nonblock_safe_read(in.fd, buf, sizeof(buf)); 5921 i = nonblock_immune_read(in.fd, buf, sizeof(buf));
5922 TRACE(("expbackq: read returns %d\n", i)); 5922 TRACE(("expbackq: read returns %d\n", i));
5923 if (i <= 0) 5923 if (i <= 0)
5924 break; 5924 break;
@@ -9617,7 +9617,7 @@ preadfd(void)
9617#if ENABLE_FEATURE_EDITING 9617#if ENABLE_FEATURE_EDITING
9618 retry: 9618 retry:
9619 if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) 9619 if (!iflag || g_parsefile->pf_fd != STDIN_FILENO)
9620 nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); 9620 nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1);
9621 else { 9621 else {
9622 int timeout = -1; 9622 int timeout = -1;
9623# if ENABLE_ASH_IDLE_TIMEOUT 9623# if ENABLE_ASH_IDLE_TIMEOUT
@@ -9663,10 +9663,10 @@ preadfd(void)
9663 } 9663 }
9664 } 9664 }
9665#else 9665#else
9666 nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); 9666 nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1);
9667#endif 9667#endif
9668 9668
9669#if 0 /* disabled: nonblock_safe_read() handles this problem */ 9669#if 0 /* disabled: nonblock_immune_read() handles this problem */
9670 if (nr < 0) { 9670 if (nr < 0) {
9671 if (parsefile->fd == 0 && errno == EWOULDBLOCK) { 9671 if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
9672 int flags = fcntl(0, F_GETFL); 9672 int flags = fcntl(0, F_GETFL);
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 68659abd3..86a6493ed 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -170,7 +170,7 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
170 170
171 if ((bufpos & 0xff) == 0) 171 if ((bufpos & 0xff) == 0)
172 buffer = xrealloc(buffer, bufpos + 0x100); 172 buffer = xrealloc(buffer, bufpos + 0x100);
173 if (nonblock_safe_read(fd, &buffer[bufpos], 1) != 1) { 173 if (nonblock_immune_read(fd, &buffer[bufpos], 1) != 1) {
174 retval = (const char *)(uintptr_t)1; 174 retval = (const char *)(uintptr_t)1;
175 break; 175 break;
176 } 176 }