When stat(2) fails, put the name of the component it failed on in the

warning message as well as the path argument.
This commit is contained in:
tjr 2002-06-10 10:03:46 +00:00
parent b9ecc7e16c
commit 64fa162345

View File

@ -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;
}