aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-08-22 22:03:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-23 14:47:45 +0200
commit20a63b2c18e9e69b02090d49b4aec399f082fdaf (patch)
treec959e3003206d50199cb3feebecd66b464cac1be
parent6bafcfb67a30dde668cceeab7669082fbcf5a489 (diff)
downloadbusybox-w32-20a63b2c18e9e69b02090d49b4aec399f082fdaf.tar.gz
busybox-w32-20a63b2c18e9e69b02090d49b4aec399f082fdaf.tar.bz2
busybox-w32-20a63b2c18e9e69b02090d49b4aec399f082fdaf.zip
ash: report reason when a script file could not be opened
It is always nicer to give the user some sort of indication why an operation failed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 703802ff5..a67a45376 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10575,7 +10575,7 @@ setinputfile(const char *fname, int flags)
10575 if (flags & INPUT_NOFILE_OK) 10575 if (flags & INPUT_NOFILE_OK)
10576 goto out; 10576 goto out;
10577 exitstatus = 127; 10577 exitstatus = 127;
10578 ash_msg_and_raise_error("can't open '%s'", fname); 10578 ash_msg_and_raise_perror("can't open '%s'", fname);
10579 } 10579 }
10580 if (fd < 10) 10580 if (fd < 10)
10581 fd = savefd(fd); 10581 fd = savefd(fd);