[git commit] ash: report reason when a script file could not be opened

Denys Vlasenko vda.linux at googlemail.com
Wed Aug 23 12:47:45 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=20a63b2c18e9e69b02090d49b4aec399f082fdaf
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

It is always nicer to give the user some sort of indication why an
operation failed.

Signed-off-by: Johannes Schindelin <johannes.schindelin at gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/ash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell/ash.c b/shell/ash.c
index 703802f..a67a453 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);


More information about the busybox-cvs mailing list