]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: filter entries before add to the tree
authorKarel Zak <kzak@redhat.com>
Thu, 18 Nov 2021 14:20:02 +0000 (15:20 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 18 Nov 2021 14:20:02 +0000 (15:20 +0100)
References: 2a83759765aeedf41d6a053150bf6c3873491b8
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c

index d4fdd6de841fd216f2a3a2a4c10e229549f92a02..55aa936fafa58ac73bb2f87cd951a6dc03b99ed1 100644 (file)
@@ -798,7 +798,7 @@ static int create_treenode(struct libscols_table *table, struct libmnt_table *tb
                fs = NULL;
 
                while (mnt_table_next_fs(tb, itr, &fs) == 0) {
-                       if (!has_line(table, fs))
+                       if (!has_line(table, fs) && match_func(fs, NULL))
                                create_treenode(table, tb, fs, NULL);
                }
        }