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);
-}
-
#define DEV_FILTERED_DEVICES_LIST 0x00001000
#define DEV_FILTERED_IS_LV 0x00002000
-int regex_filter_contains_symlink(struct cmd_context *cmd);
-
#endif /* _LVM_FILTER_H */
* filter. We get devs from the pvs_online files, so we inherit the
* regex filtering from pvscan and don't have to do it ourself.
*/
- if (!cmd->enable_devices_file &&
- !cmd->enable_devices_list &&
- regex_filter_contains_symlink(cmd))
- cmd->filter_regex_skip = 1;
+ cmd->filter_regex_skip = 1;
cmd->filter_nodata_only = 1;
*/
if ((dm_list_size(&pvscan_devs) == 1) &&
!cmd->enable_devices_file &&
- !cmd->enable_devices_list &&
- regex_filter_contains_symlink(cmd)) {
+ !cmd->enable_devices_list) {
char *env_str;
struct dm_list *env_aliases;
devl = dm_list_item(dm_list_first(&pvscan_devs), struct device_list);