summaryrefslogtreecommitdiffstats
path: root/usr.bin/pathchk
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-06-10 10:03:46 +0000
committertjr <tjr@FreeBSD.org>2002-06-10 10:03:46 +0000
commit64fa16234520f104d01ac0c8e944f19fe8927c75 (patch)
tree704fb022f4becf6a07049067299303ba26b69a89 /usr.bin/pathchk
parentb9ecc7e16c1d10bc7cac12a3cd4a4e138929c63d (diff)
downloadFreeBSD-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.c3
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;
}
OpenPOWER on IntegriCloud