summaryrefslogtreecommitdiff
path: root/lib/filters/filter-regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filters/filter-regex.c')
-rw-r--r--lib/filters/filter-regex.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/filters/filter-regex.c b/lib/filters/filter-regex.c
index ecc32914b..5f348674d 100644
--- a/lib/filters/filter-regex.c
+++ b/lib/filters/filter-regex.c
@@ -253,48 +253,3 @@ struct dev_filter *regex_filter_create(const struct dm_config_value *patterns, i
dm_pool_destroy(mem);
return NULL;
}
-
-static int _filter_contains_symlink(struct cmd_context *cmd, int filter_cfg)
-{
- const struct dm_config_node *cn;
- const struct dm_config_value *cv;
- const char *fname;
-
- if ((cn = find_config_tree_array(cmd, filter_cfg, NULL))) {
- for (cv = cn->v; cv; cv = cv->next) {
- if (cv->type != DM_CFG_STRING)
- continue;
- if (!cv->v.str)
- continue;
-
- fname = cv->v.str;
-
- if (fname[0] != 'a')
- continue;
-
- if (strstr(fname, "/dev/disk/"))
- return 1;
- if (strstr(fname, "/dev/mapper/"))
- return 1;
-
- /* In case /dev/disk/by was omitted */
- if (strstr(fname, "lvm-pv-uuid"))
- return 1;
- if (strstr(fname, "dm-uuid"))
- return 1;
- if (strstr(fname, "wwn-"))
- return 1;
- if (strstr(fname, "pci-"))
- return 1;
- }
- }
-
- return 0;
-}
-
-int regex_filter_contains_symlink(struct cmd_context *cmd)
-{
- return _filter_contains_symlink(cmd, devices_filter_CFG) ||
- _filter_contains_symlink(cmd, devices_global_filter_CFG);
-}
-