sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 6d4a7989cda6a60fddced9e916fa2882e095afa9
parent a29d31e94b88ef4cdfb3bd760321867ba4df1248
Author: sin <sin@2f30.org>
Date:   Wed, 11 Feb 2015 11:58:02 +0000

readlink: Use eprintf() to report errors

Diffstat:
Mreadlink.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/readlink.c b/readlink.c @@ -83,14 +83,14 @@ mdone: break; case 'e': if (stat(argv[0], &st) < 0) - exit(1); + eprintf("stat %s:", argv[0]); case 'f': if (!realpath(argv[0], b)) - exit(1); + eprintf("realpath %s:", argv[0]); break; default: if ((n = readlink(argv[0], b, PATH_MAX - 1)) < 0) - exit(1); + eprintf("readlink %s:", argv[0]); b[n] = '\0'; } printf("%s", b);