Fix pathchk manpage regarding exit status
Also, rename _attr to st.
This commit is contained in:
parent
efabd56535
commit
73c8dfafe9
|
@ -23,7 +23,7 @@ Check for empty pathnames and leading hythens.
|
||||||
.Sh EXIT STATUS
|
.Sh EXIT STATUS
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It 0
|
.It 0
|
||||||
A filename was not valid or portable.
|
All pathname operands passed all of the checks.
|
||||||
.It > 0
|
.It > 0
|
||||||
An error occurred.
|
An error occurred.
|
||||||
.El
|
.El
|
||||||
|
|
|
@ -21,7 +21,7 @@ pathchk(char *filename)
|
||||||
char *invalid, *invalid_end, *p, *q;
|
char *invalid, *invalid_end, *p, *q;
|
||||||
const char *character_set;
|
const char *character_set;
|
||||||
size_t len, maxlen;
|
size_t len, maxlen;
|
||||||
struct stat _attr;
|
struct stat st;
|
||||||
|
|
||||||
/* Empty? */
|
/* Empty? */
|
||||||
if (extra && !*filename) {
|
if (extra && !*filename) {
|
||||||
|
@ -52,7 +52,7 @@ pathchk(char *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Symlink error? Non-searchable directory? */
|
/* Symlink error? Non-searchable directory? */
|
||||||
if (lstat(filename, &_attr) && errno != ENOENT) {
|
if (lstat(filename, &st) && errno != ENOENT) {
|
||||||
/* lstat rather than stat, so that if filename is a bad symlink, but
|
/* lstat rather than stat, so that if filename is a bad symlink, but
|
||||||
* all parents are OK, no error will be detected. */
|
* all parents are OK, no error will be detected. */
|
||||||
weprintf("%s: %s:", argv0, filename);
|
weprintf("%s: %s:", argv0, filename);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user