diff options
author | cracauer <cracauer@FreeBSD.org> | 1999-11-29 19:11:01 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 1999-11-29 19:11:01 +0000 |
commit | 903b2c868c14cd85dd3b2e2675969b9cb17f94ea (patch) | |
tree | 6ca499c12c2fb731744e3f10743e0e08fdad94e3 /bin/sh/input.c | |
parent | 80af32c97b108dacf6028b29ecae08e5da839113 (diff) | |
download | FreeBSD-src-903b2c868c14cd85dd3b2e2675969b9cb17f94ea.zip FreeBSD-src-903b2c868c14cd85dd3b2e2675969b9cb17f94ea.tar.gz |
Include strerror(errno) in error messages after failed system calls.
Fix a warning.
Diffstat (limited to 'bin/sh/input.c')
-rw-r--r-- | bin/sh/input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c index 809a335..d75dfa4 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -383,7 +383,7 @@ setinputfile(fname, push) INTOFF; if ((fd = open(fname, O_RDONLY)) < 0) - error("Can't open %s", fname); + error("Can't open %s: %s", fname, strerror(errno)); if (fd < 10) { fd2 = copyfd(fd, 10); close(fd); |