From b912fe73eec0437f905cc1b17d992e2b70ef76ef Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 18 Oct 2006 10:58:27 +0000 Subject: [PATCH] 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 --- bin/ls/print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/ls/print.c b/bin/ls/print.c index 8ca40e2ba57..6578b93aff7 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; }