diff options
author | ru <ru@FreeBSD.org> | 2006-10-18 10:58:27 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-10-18 10:58:27 +0000 |
commit | 5968c5802fef666ef00a33be6ef9295a1a176932 (patch) | |
tree | 2032b5480ef2c02a40f649b57f8c49d9ab9c3308 /bin | |
parent | 2d9b623d375db916b10075525931353a9970713e (diff) | |
download | FreeBSD-src-5968c5802fef666ef00a33be6ef9295a1a176932.zip FreeBSD-src-5968c5802fef666ef00a33be6ef9295a1a176932.tar.gz |
Avoid a spurious warning for each whiteout found during "ls -lW".
# ls -lW
total 2
-rw-r--r-- 1 root wheel 6 Oct 18 14:46 file1
ls: ./file2: No such file or directory
w--------- 0 root wheel 0 Jan 1 1970 file2
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ls/print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 8ca40e2..6578b93 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -628,9 +628,10 @@ aclmode(char *buf, const FTSENT *p, int *haveacls) p->fts_parent->fts_accpath, p->fts_name); /* * We have no way to tell whether a symbolic link has an ACL since - * pathconf() and acl_get_file() both follow them. + * pathconf() and acl_get_file() both follow them. They also don't + * support whiteouts. */ - if (S_ISLNK(p->fts_statp->st_mode)) { + if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) { *haveacls = 1; return; } |