]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types
authorMasatake YAMATO <yamato@redhat.com>
Thu, 22 Jun 2023 02:28:47 +0000 (11:28 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 22 Jun 2023 05:29:08 +0000 (14:29 +0900)
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 <yamato@redhat.com>
misc-utils/lsfd-filter.c

index ff55bb7f158f4706917965a9b02d2e1c8932fca4..6f5561bc7881540374d87800e9939f19e93510de 100644 (file)
@@ -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: