From f2ef15fec455a662cfda392260d6b2bb08a82066 Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Mon, 28 Jan 2019 02:00:39 +0000 Subject: [PATCH] Fix whiteout support in find(1) find(1) ignores -type w passed to it. With this patch find(1) properly identifies and prints whiteouts. PR: 126384, 156703 Submitted by: oleg@mamontov.net MFC after: 1 week --- usr.bin/find/find.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index fd1d3966036..656a7e06204 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -208,8 +208,10 @@ find_execute(PLAN *plan, char *paths[]) entry->fts_path, strerror(entry->fts_errno)); exitstatus = 1; continue; -#ifdef FTS_W +#if defined(FTS_W) && defined(FTS_WHITEOUT) case FTS_W: + if (ftsoptions & FTS_WHITEOUT) + break; continue; #endif /* FTS_W */ }