diff options
author | tjr <tjr@FreeBSD.org> | 2002-06-10 10:03:46 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-06-10 10:03:46 +0000 |
commit | 64fa16234520f104d01ac0c8e944f19fe8927c75 (patch) | |
tree | 704fb022f4becf6a07049067299303ba26b69a89 /usr.bin/pathchk | |
parent | b9ecc7e16c1d10bc7cac12a3cd4a4e138929c63d (diff) | |
download | FreeBSD-src-64fa16234520f104d01ac0c8e944f19fe8927c75.zip FreeBSD-src-64fa16234520f104d01ac0c8e944f19fe8927c75.tar.gz |
When stat(2) fails, put the name of the component it failed on in the
warning message as well as the path argument.
Diffstat (limited to 'usr.bin/pathchk')
-rw-r--r-- | usr.bin/pathchk/pathchk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/pathchk/pathchk.c b/usr.bin/pathchk/pathchk.c index 7f11e44..a0ef92a 100644 --- a/usr.bin/pathchk/pathchk.c +++ b/usr.bin/pathchk/pathchk.c @@ -124,7 +124,8 @@ check(const char *path) } if (!pflag && stat(pathd, &sb) == -1 && errno != ENOENT) { - warn("%s", pathd); + warn("%s: %.*s", path, (int)(strlen(pathd) - + complen - 1), pathd); goto bad; } |