summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-02-04 21:03:59 -0500
committerTavian Barnes <tavianator@tavianator.com>2017-02-04 21:05:39 -0500
commit9f1863d45fe596e258596a4b4cc9a4064bcb11d3 (patch)
tree4a627b699f52f03eabd145852891c2aef7c5cb76 /parse.c
parent538e4b2054e9802ebc860943e0a43baf2ee46741 (diff)
downloadbfs-9f1863d45fe596e258596a4b4cc9a4064bcb11d3.tar.xz
Implement -nouser and -nogroup
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 7f656c3..d0168a9 100644
--- a/parse.c
+++ b/parse.c
@@ -1206,6 +1206,13 @@ static struct expr *parse_newerxy(struct parser_state *state, int arg1, int arg2
}
/**
+ * Parse -nogroup.
+ */
+static struct expr *parse_nogroup(struct parser_state *state, int arg1, int arg2) {
+ return parse_nullary_test(state, eval_nogroup);
+}
+
+/**
* Parse -nohidden.
*/
static struct expr *parse_nohidden(struct parser_state *state, int arg1, int arg2) {
@@ -1226,6 +1233,13 @@ static struct expr *parse_noleaf(struct parser_state *state, int arg1, int arg2)
}
/**
+ * Parse -nouser.
+ */
+static struct expr *parse_nouser(struct parser_state *state, int arg1, int arg2) {
+ return parse_nullary_test(state, eval_nouser);
+}
+
+/**
* Parse a permission mode like chmod(1).
*/
static int parse_mode(const struct parser_state *state, const char *mode, struct expr *expr) {
@@ -1857,10 +1871,12 @@ static const struct table_entry parse_table[] = {
{"newer", false, parse_acnewer, MTIME},
{"newer", true, parse_newerxy},
{"nocolor", false, parse_color, false},
+ {"nogroup", false, parse_nogroup},
{"nohidden", false, parse_nohidden},
{"noignore_readdir_race", false, parse_ignore_races, false},
{"noleaf", false, parse_noleaf},
{"not"},
+ {"nouser", false, parse_nouser},
{"nowarn", false, parse_warn, false},
{"o"},
{"ok", false, parse_exec, EXEC_CONFIRM},