aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-23 14:52:56 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-23 14:52:56 +0200
commit12ffefb5490b281db7f2cde11bf8cf8c91283e83 (patch)
tree548b9062f7567613d48093fceab0dc148f7d5e1c
parent687aac056d08ef7c0eafb3d610d3dcdce35b635a (diff)
downloadbusybox-w32-12ffefb5490b281db7f2cde11bf8cf8c91283e83.tar.gz
busybox-w32-12ffefb5490b281db7f2cde11bf8cf8c91283e83.tar.bz2
busybox-w32-12ffefb5490b281db7f2cde11bf8cf8c91283e83.zip
ash: more s/error/perror/ for better error reporting
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 60bcd1b0a..3fa7f4d9f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4994,7 +4994,7 @@ forkchild(struct job *jp, union node *n, int mode)
4994 if (jp->nprocs == 0) { 4994 if (jp->nprocs == 0) {
4995 close(0); 4995 close(0);
4996 if (open(bb_dev_null, O_RDONLY) != 0) 4996 if (open(bb_dev_null, O_RDONLY) != 0)
4997 ash_msg_and_raise_error("can't open '%s'", bb_dev_null); 4997 ash_msg_and_raise_perror("can't open '%s'", bb_dev_null);
4998 } 4998 }
4999 } 4999 }
5000 if (oldlvl == 0) { 5000 if (oldlvl == 0) {
@@ -5083,7 +5083,7 @@ forkshell(struct job *jp, union node *n, int mode)
5083 TRACE(("Fork failed, errno=%d", errno)); 5083 TRACE(("Fork failed, errno=%d", errno));
5084 if (jp) 5084 if (jp)
5085 freejob(jp); 5085 freejob(jp);
5086 ash_msg_and_raise_error("can't fork"); 5086 ash_msg_and_raise_perror("can't fork");
5087 } 5087 }
5088 if (pid == 0) { 5088 if (pid == 0) {
5089 CLEAR_RANDOM_T(&random_gen); /* or else $RANDOM repeats in child */ 5089 CLEAR_RANDOM_T(&random_gen); /* or else $RANDOM repeats in child */
@@ -5226,7 +5226,7 @@ openhere(union node *redir)
5226 size_t len = 0; 5226 size_t len = 0;
5227 5227
5228 if (pipe(pip) < 0) 5228 if (pipe(pip) < 0)
5229 ash_msg_and_raise_error("pipe call failed"); 5229 ash_msg_and_raise_perror("can't create pipe");
5230 if (redir->type == NHERE) { 5230 if (redir->type == NHERE) {
5231 len = strlen(redir->nhere.doc->narg.text); 5231 len = strlen(redir->nhere.doc->narg.text);
5232 if (len <= PIPE_BUF) { 5232 if (len <= PIPE_BUF) {
@@ -6288,7 +6288,7 @@ evalbackcmd(union node *n, struct backcmd *result)
6288 } 6288 }
6289 6289
6290 if (pipe(pip) < 0) 6290 if (pipe(pip) < 0)
6291 ash_msg_and_raise_error("pipe call failed"); 6291 ash_msg_and_raise_perror("can't create pipe");
6292 jp = makejob(/*n,*/ 1); 6292 jp = makejob(/*n,*/ 1);
6293 if (forkshell(jp, n, FORK_NOJOB) == 0) { 6293 if (forkshell(jp, n, FORK_NOJOB) == 0) {
6294 /* child */ 6294 /* child */
@@ -9180,7 +9180,7 @@ evalpipe(union node *n, int flags)
9180 if (lp->next) { 9180 if (lp->next) {
9181 if (pipe(pip) < 0) { 9181 if (pipe(pip) < 0) {
9182 close(prevfd); 9182 close(prevfd);
9183 ash_msg_and_raise_error("pipe call failed"); 9183 ash_msg_and_raise_perror("can't create pipe");
9184 } 9184 }
9185 } 9185 }
9186 if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) { 9186 if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) {