if (conf->hwhandler)
FREE(conf->hwhandler);
+ if (conf->bindings_file)
+ FREE(conf->bindings_file);
+
if (conf->prio_name)
FREE(conf->prio_name);
conf->minio = DEFAULT_MINIO;
conf->minio_rq = DEFAULT_MINIO_RQ;
conf->max_fds = 0;
- conf->bindings_file = DEFAULT_BINDINGS_FILE;
+ conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
conf->bindings_read_only = 0;
conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
conf->flush_on_last_del = 0;
if (conf->udev_dir == NULL)
conf->udev_dir = set_default(DEFAULT_UDEVDIR);
- if (!conf->udev_dir || !conf->multipath_dir)
+ if (conf->bindings_file == NULL)
+ conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
+
+ if (!conf->udev_dir || !conf->multipath_dir ||
+ !conf->bindings_file)
goto out;
return 0;
return 0;
}
+static int
+bindings_file_handler(vector strvec)
+{
+ conf->bindings_file = set_value(strvec);
+
+ if (!conf->bindings_file)
+ return 1;
+
+ return 0;
+}
+
/*
* blacklist block handlers
*/
}
static int
+snprint_def_bindings_file (char * buff, int len, void * data)
+{
+ if (conf->bindings_file == NULL)
+ return 0;
+ if (strlen(conf->bindings_file) == strlen(DEFAULT_BINDINGS_FILE) &&
+ !strcmp(conf->bindings_file, DEFAULT_BINDINGS_FILE))
+ return 0;
+
+ return snprintf(buff, len, "%s", conf->bindings_file);
+}
+
+static int
snprint_ble_simple (char * buff, int len, void * data)
{
struct blentry * ble = (struct blentry *)data;
install_keyword("gid", &def_gid_handler, &snprint_def_gid);
install_keyword("fast_io_fail_tmo", &def_fast_io_fail_handler, &snprint_def_fast_io_fail);
install_keyword("dev_loss_tmo", &def_dev_loss_handler, &snprint_def_dev_loss);
+ install_keyword("bindings_file", &bindings_file_handler, &snprint_def_bindings_file);
__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
__deprecated install_keyword("default_getuid_callout", &def_getuid_callout_handler, NULL);
# # values : n > 0
# # default : determined by the OS
# dev_loss_tmo 600
+# # name : bindings_file
+# # scope : multipath
+# # desc : The location of the bindings file that is used with
+# # the user_friendly_names option.
+# # values : <full_pathname>
+# # default : "/var/lib/multipath/bindings"
+# bindings_file "/etc/multipath_bindings"
+#
#}
#
##