Subject: bin/5419: find's "-type W" option doesn't work
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 05/08/1998 01:36:51
>Number:         5419
>Category:       bin
>Synopsis:       find's "-type W" option doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May  7 23:50:01 1998
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 22 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of May 7, 1998
>Environment:
	
System: NetBSD dahan.metonymy.com 1.3E NetBSD 1.3E (SPIFF) #213: Wed May 6 00:45:25 CDT 1998 khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/SPIFF i386


>Description:
	find(1)'s "-type W" option is supposed to match all whiteouts,
but it doesn't.
>How-To-Repeat:
	Assuming a union mount with /lower as the lower layer and
/upper as the upper layer:

% cd /upper
% touch /lower/somefile
% rm somefile
% ls -WF
somefile%
% find . -type W
%

>Fix:
	I'm pretty sure find used to work, so perhaps that block was
added for a reason... but it's not doing the right thing :)

--- /usr/src/usr.bin/find/find.c	Sun Feb 22 06:13:10 1998
+++ find.c	Fri May  8 01:22:09 1998
@@ -183,10 +183,6 @@
 			    entry->fts_path, strerror(entry->fts_errno));
 			rval = 1;
 			continue;
-#ifdef FTS_W
-		case FTS_W:
-			continue;
-#endif /* FTS_W */
 		}
 #define	BADCH	" \t\n\\'\""
 		if (isxargs && strpbrk(entry->fts_path, BADCH)) {
>Audit-Trail:
>Unformatted: