From: Johannes Schindelin Date: Tue, 22 Aug 2017 20:03:17 +0000 (+0200) Subject: ash: report reason when a script file could not be opened X-Git-Tag: 1_28_0~99 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20a63b2c18e9e69b02090d49b4aec399f082fdaf;p=oweals%2Fbusybox.git 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 Signed-off-by: Denys Vlasenko --- 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) if (flags & INPUT_NOFILE_OK) goto out; exitstatus = 127; - ash_msg_and_raise_error("can't open '%s'", fname); + ash_msg_and_raise_perror("can't open '%s'", fname); } if (fd < 10) fd = savefd(fd);