@@ -16,6 +16,16 @@
# udev_dir /dev
#
# #
+# # name : verbosity
+# # scope : multipath & multipathd
+# # desc : The verbosity level of the command. It can be overridden by
+# # the -v command line option.
+# # values : 0-6
+# # default : 2
+# #
+# verbosity 3
+#
+# #
# # name : polling_interval
# # scope : multipathd
# # desc : interval between two path checks in seconds
@@ -407,7 +407,7 @@
* internal defaults
*/
if (!conf->verbosity)
- conf->verbosity = 2;
+ conf->verbosity = DEFAULT_VERBOSITY;
conf->dev_type = DEV_NONE;
conf->minio = 1000;
@@ -11,6 +11,7 @@
#define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF
#define DEFAULT_PGTIMEOUT -PGTIMEOUT_NONE
#define DEFAULT_USER_FRIENDLY_NAMES 0
+#define DEFAULT_VERBOSITY 2
#define DEFAULT_CHECKINT 5
#define MAX_CHECKINT(a) (a << 2)
@@ -35,6 +35,17 @@
}
static int
+verbosity_handler(vector strvec)
+{
+ char * buff;
+
+ buff = VECTOR_SLOT(strvec, 1);
+ conf->verbosity = atoi(buff);
+
+ return 0;
+}
+
+static int
udev_dir_handler(vector strvec)
{
conf->udev_dir = set_value(strvec);
@@ -1651,6 +1662,14 @@
}
static int
+snprint_def_verbosity (char * buff, int len, void * data)
+{
+ if (conf->checkint == DEFAULT_VERBOSITY)
+ return 0;
+ return snprintf(buff, len, "%i", conf->verbosity);
+}
+
+static int
snprint_def_udev_dir (char * buff, int len, void * data)
{
if (!conf->udev_dir)
@@ -1927,6 +1946,8 @@
init_keywords(void)
{
install_keyword_root("defaults", NULL);
+ install_keyword("verbosity", &verbosity_handler, &snprint_def_verbosity)
+;
install_keyword("polling_interval", &polling_interval_handler, &snprint_def_polling_interval);
install_keyword("udev_dir", &udev_dir_handler, &snprint_def_udev_dir);
install_keyword("selector", &def_selector_handler, &snprint_def_selector);