summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-20 21:23:02 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-20 21:23:02 -0500
commit0609e6f29719a7e88b8233d6bd5b75509a2d59f5 (patch)
treed47936c46a7cf9a4db81ae61aa725c73e5d7f3d3 /parse.c
parent96ca12560f5c4007891985f98fba94fd9c0dc241 (diff)
downloadbfs-0609e6f29719a7e88b8233d6bd5b75509a2d59f5.tar.xz
Implement -sparse from FreeBSD find
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 33f928b..64ed11b 100644
--- a/parse.c
+++ b/parse.c
@@ -1662,6 +1662,13 @@ fail:
}
/**
+ * Parse -sparse.
+ */
+static struct expr *parse_sparse(struct parser_state *state, int arg1, int arg2) {
+ return parse_nullary_test(state, eval_sparse);
+}
+
+/**
* Parse -x?type [bcdpfls].
*/
static struct expr *parse_type(struct parser_state *state, int x, int arg2) {
@@ -1837,6 +1844,7 @@ static const struct table_entry parse_table[] = {
{"regextype", false, parse_regextype},
{"samefile", false, parse_samefile},
{"size", false, parse_size},
+ {"sparse", false, parse_sparse},
{"true", false, parse_const, true},
{"type", false, parse_type, false},
{"uid", false, parse_user},