summaryrefslogtreecommitdiffstats
path: root/usr.bin/find/find.h
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-09-04 16:09:01 +0000
committerru <ru@FreeBSD.org>2001-09-04 16:09:01 +0000
commitf83248d955e55cba999d478b18b0216f1540e7a0 (patch)
treeae4ff4c89d3d1e609ef173e35ec5a7635f8c2dc6 /usr.bin/find/find.h
parent878a79c3e6de0481128689fbe94fb8cab74174c0 (diff)
downloadFreeBSD-src-f83248d955e55cba999d478b18b0216f1540e7a0.zip
FreeBSD-src-f83248d955e55cba999d478b18b0216f1540e7a0.tar.gz
The implementation of -flags was broken and did not match the (poorly)
documented behavior. Only a certain set of file flags were recognized, and "no" flags did not match files that have corresponding flags bits turned off. Fix and extend the -flags functionality as follows: : -flags [-|+]<flags>,<notflags> : The flags are specified using symbolic names (see chflags(1)). : Those with the "no" prefix (except "nodump") are said to be : <notflags>. Flags in <flags> are checked to be set, and flags in : <notflags> are checked to be not set. Note that this is different : from -perm, which only allows the user to specify mode bits that : are set. : : If flags are preceded by a dash (``-''), this primary evaluates : to true if at least all of the bits in <flags> and none of the bits : in <notflags> are set in the file's flags bits. If flags are pre- : ceded by a plus (``+''), this primary evaluates to true if any of : the bits in <flags> is set in the file's flags bits, or any of the : bits in <notflags> is not set in the file's flags bits. Otherwise, : this primary evaluates to true if the bits in <flags> exactly match : the file's flags bits, and none of the <flags> bits match those of : <notflags>. MFC after: 2 weeks
Diffstat (limited to 'usr.bin/find/find.h')
-rw-r--r--usr.bin/find/find.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/find/find.h b/usr.bin/find/find.h
index ce09344..b2c73c3 100644
--- a/usr.bin/find/find.h
+++ b/usr.bin/find/find.h
@@ -81,7 +81,7 @@ typedef struct _plandata {
mode_t _m_data; /* mode mask */
struct {
u_long _f_flags;
- u_long _f_mask;
+ u_long _f_notflags;
} fl;
nlink_t _l_data; /* link count */
off_t _o_data; /* file size */
@@ -102,7 +102,7 @@ typedef struct _plandata {
#define a_data p_un._a_data
#define c_data p_un._c_data
#define fl_flags p_un.fl._f_flags
-#define fl_mask p_un.fl._f_mask
+#define fl_notflags p_un.fl._f_notflags
#define g_data p_un._g_data
#define i_data p_un._i_data
#define l_data p_un._l_data
OpenPOWER on IntegriCloud