From: Masatake YAMATO Date: Thu, 22 Jun 2023 02:28:47 +0000 (+0900) Subject: lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types X-Git-Tag: v2.40-rc1~373^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de7e11495bfe7a0233f7862cdcafbd585ee1b767;p=thirdparty%2Futil-linux.git lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types We will have operators for array types in the future. Till having them, we treat the types as STRING. So we can use string operators for the column having types. Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lsfd-filter.c b/misc-utils/lsfd-filter.c index ff55bb7f15..6f5561bc78 100644 --- a/misc-utils/lsfd-filter.c +++ b/misc-utils/lsfd-filter.c @@ -772,6 +772,10 @@ static struct node *dparser_compile1(struct parser *parser, struct node *last) int ntype; switch (jtype) { case SCOLS_JSON_STRING: + case SCOLS_JSON_ARRAY_STRING: + case SCOLS_JSON_ARRAY_NUMBER: + /* We handles SCOLS_JSON_ARRAY_* as a string + * till we implement operators for arrays. */ ntype = NODE_STR; break; case SCOLS_JSON_NUMBER: