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:
Tim J. Robbins 2002-06-10 10:03:46 +00:00
parent 43d088bea2
commit 2a84afe106
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98093

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