Blame SOURCES/0081-libmultipath-pass-file-and-line-number-to-keyword-ha.patch

adddbf
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
adddbf
From: Benjamin Marzinski <bmarzins@redhat.com>
adddbf
Date: Fri, 24 Sep 2021 17:59:12 -0500
adddbf
Subject: [PATCH] libmultipath: pass file and line number to keyword handlers
adddbf
adddbf
This will make it possible for the keyword handlers to print more useful
adddbf
warning messages. It will be used by future patches.
adddbf
adddbf
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
adddbf
---
adddbf
 libmultipath/dict.c   | 145 +++++++++++++++++++++++++-----------------
adddbf
 libmultipath/parser.c |   3 +-
adddbf
 libmultipath/parser.h |   2 +-
adddbf
 3 files changed, 91 insertions(+), 59 deletions(-)
adddbf
adddbf
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
adddbf
index 13698b76..a8872da7 100644
adddbf
--- a/libmultipath/dict.c
adddbf
+++ b/libmultipath/dict.c
adddbf
@@ -28,7 +28,7 @@
adddbf
 #include "dict.h"
adddbf
 
adddbf
 static int
adddbf
-set_int(vector strvec, void *ptr)
adddbf
+set_int(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
 	char *buff, *eptr;
adddbf
@@ -57,7 +57,7 @@ set_int(vector strvec, void *ptr)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_uint(vector strvec, void *ptr)
adddbf
+set_uint(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	unsigned int *uint_ptr = (unsigned int *)ptr;
adddbf
 	char *buff, *eptr, *p;
adddbf
@@ -89,7 +89,7 @@ set_uint(vector strvec, void *ptr)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_str(vector strvec, void *ptr)
adddbf
+set_str(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char **str_ptr = (char **)ptr;
adddbf
 
adddbf
@@ -104,7 +104,7 @@ set_str(vector strvec, void *ptr)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_regex(vector strvec, void *ptr)
adddbf
+set_regex(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char **str_ptr = (char **)ptr;
adddbf
 
adddbf
@@ -119,7 +119,7 @@ set_regex(vector strvec, void *ptr)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_yes_no(vector strvec, void *ptr)
adddbf
+set_yes_no(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
@@ -138,7 +138,7 @@ set_yes_no(vector strvec, void *ptr)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_yes_no_undef(vector strvec, void *ptr)
adddbf
+set_yes_no_undef(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
@@ -240,9 +240,10 @@ print_yes_no_undef (char *buff, int len, long v)
adddbf
 
adddbf
 #define declare_def_handler(option, function)				\
adddbf
 static int								\
adddbf
-def_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+def_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			    const char *file, int line_nr)		\
adddbf
 {									\
adddbf
-	return function (strvec, &conf->option);			\
adddbf
+	return function (strvec, &conf->option, file, line_nr);		\
adddbf
 }
adddbf
 
adddbf
 #define declare_def_snprint(option, function)				\
adddbf
@@ -277,12 +278,13 @@ snprint_def_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 
adddbf
 #define declare_hw_handler(option, function)				\
adddbf
 static int								\
adddbf
-hw_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+hw_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			   const char *file, int line_nr)		\
adddbf
 {									\
adddbf
 	struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable);		\
adddbf
 	if (!hwe)							\
adddbf
 		return 1;						\
adddbf
-	return function (strvec, &hwe->option);				\
adddbf
+	return function (strvec, &hwe->option, file, line_nr);		\
adddbf
 }
adddbf
 
adddbf
 #define declare_hw_snprint(option, function)				\
adddbf
@@ -296,11 +298,12 @@ snprint_hw_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 
adddbf
 #define declare_ovr_handler(option, function)				\
adddbf
 static int								\
adddbf
-ovr_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+ovr_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			    const char *file, int line_nr)		\
adddbf
 {									\
adddbf
 	if (!conf->overrides)						\
adddbf
 		return 1;						\
adddbf
-	return function (strvec, &conf->overrides->option);		\
adddbf
+	return function (strvec, &conf->overrides->option, file, line_nr); \
adddbf
 }
adddbf
 
adddbf
 #define declare_ovr_snprint(option, function)				\
adddbf
@@ -313,12 +316,13 @@ snprint_ovr_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 
adddbf
 #define declare_mp_handler(option, function)				\
adddbf
 static int								\
adddbf
-mp_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+mp_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			   const char *file, int line_nr)		\
adddbf
 {									\
adddbf
 	struct mpentry * mpe = VECTOR_LAST_SLOT(conf->mptable);		\
adddbf
 	if (!mpe)							\
adddbf
 		return 1;						\
adddbf
-	return function (strvec, &mpe->option);				\
adddbf
+	return function (strvec, &mpe->option, file, line_nr);		\
adddbf
 }
adddbf
 
adddbf
 #define declare_mp_snprint(option, function)				\
adddbf
@@ -330,9 +334,10 @@ snprint_mp_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 	return function (buff, len, mpe->option);			\
adddbf
 }
adddbf
 
adddbf
-static int checkint_handler(struct config *conf, vector strvec)
adddbf
+static int checkint_handler(struct config *conf, vector strvec,
adddbf
+			    const char *file, int line_nr)
adddbf
 {
adddbf
-	int rc = set_uint(strvec, &conf->checkint);
adddbf
+	int rc = set_uint(strvec, &conf->checkint, file, line_nr);
adddbf
 
adddbf
 	if (rc)
adddbf
 		return rc;
adddbf
@@ -355,9 +360,10 @@ declare_def_snprint(reassign_maps, print_yes_no)
adddbf
 declare_def_handler(multipath_dir, set_str)
adddbf
 declare_def_snprint(multipath_dir, print_str)
adddbf
 
adddbf
-static int def_partition_delim_handler(struct config *conf, vector strvec)
adddbf
+static int def_partition_delim_handler(struct config *conf, vector strvec,
adddbf
+				       const char *file, int line_nr)
adddbf
 {
adddbf
-	int rc = set_str(strvec, &conf->partition_delim);
adddbf
+	int rc = set_str(strvec, &conf->partition_delim, file, line_nr);
adddbf
 
adddbf
 	if (rc != 0)
adddbf
 		return rc;
adddbf
@@ -387,13 +393,13 @@ static const char * const find_multipaths_optvals[] = {
adddbf
 };
adddbf
 
adddbf
 static int
adddbf
-def_find_multipaths_handler(struct config *conf, vector strvec)
adddbf
+def_find_multipaths_handler(struct config *conf, vector strvec,
adddbf
+			    const char *file, int line_nr)
adddbf
 {
adddbf
 	char *buff;
adddbf
 	int i;
adddbf
 
adddbf
-	if (set_yes_no_undef(strvec, &conf->find_multipaths) == 0 &&
adddbf
-	    conf->find_multipaths != FIND_MULTIPATHS_UNDEF)
adddbf
+	if (set_yes_no_undef(strvec, &conf->find_multipaths, file, line_nr) == 0 && conf->find_multipaths != FIND_MULTIPATHS_UNDEF)
adddbf
 		return 0;
adddbf
 
adddbf
 	buff = set_value(strvec);
adddbf
@@ -451,7 +457,8 @@ static int snprint_uid_attrs(struct config *conf, char *buff, int len,
adddbf
 	return p - buff;
adddbf
 }
adddbf
 
adddbf
-static int uid_attrs_handler(struct config *conf, vector strvec)
adddbf
+static int uid_attrs_handler(struct config *conf, vector strvec,
adddbf
+			     const char *file, int line_nr)
adddbf
 {
adddbf
 	char *val;
adddbf
 
adddbf
@@ -644,7 +651,8 @@ declare_hw_handler(skip_kpartx, set_yes_no_undef)
adddbf
 declare_hw_snprint(skip_kpartx, print_yes_no_undef)
adddbf
 declare_mp_handler(skip_kpartx, set_yes_no_undef)
adddbf
 declare_mp_snprint(skip_kpartx, print_yes_no_undef)
adddbf
-static int def_disable_changed_wwids_handler(struct config *conf, vector strvec)
adddbf
+static int def_disable_changed_wwids_handler(struct config *conf, vector strvec,
adddbf
+					     const char *file, int line_nr)
adddbf
 {
adddbf
 	return 0;
adddbf
 }
adddbf
@@ -675,20 +683,23 @@ declare_def_snprint_defstr(enable_foreign, print_str,
adddbf
 			   DEFAULT_ENABLE_FOREIGN)
adddbf
 
adddbf
 static int
adddbf
-def_config_dir_handler(struct config *conf, vector strvec)
adddbf
+def_config_dir_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		       int line_nr)
adddbf
 {
adddbf
 	/* this is only valid in the main config file */
adddbf
 	if (conf->processed_main_config)
adddbf
 		return 0;
adddbf
-	return set_str(strvec, &conf->config_dir);
adddbf
+	return set_str(strvec, &conf->config_dir, file, line_nr);
adddbf
 }
adddbf
 declare_def_snprint(config_dir, print_str)
adddbf
 
adddbf
 #define declare_def_attr_handler(option, function)			\
adddbf
 static int								\
adddbf
-def_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+def_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			    const char *file, int line_nr)		\
adddbf
 {									\
adddbf
-	return function (strvec, &conf->option, &conf->attribute_flags);\
adddbf
+	return function (strvec, &conf->option, &conf->attribute_flags, \
adddbf
+			 file, line_nr);				\
adddbf
 }
adddbf
 
adddbf
 #define declare_def_attr_snprint(option, function)			\
adddbf
@@ -702,12 +713,14 @@ snprint_def_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 
adddbf
 #define declare_mp_attr_handler(option, function)			\
adddbf
 static int								\
adddbf
-mp_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+mp_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			   const char *file, int line_nr)		\
adddbf
 {									\
adddbf
 	struct mpentry * mpe = VECTOR_LAST_SLOT(conf->mptable);		\
adddbf
 	if (!mpe)							\
adddbf
 		return 1;						\
adddbf
-	return function (strvec, &mpe->option, &mpe->attribute_flags);	\
adddbf
+	return function (strvec, &mpe->option, &mpe->attribute_flags,	\
adddbf
+			 file, line_nr);				\
adddbf
 }
adddbf
 
adddbf
 #define declare_mp_attr_snprint(option, function)			\
adddbf
@@ -721,7 +734,7 @@ snprint_mp_ ## option (struct config *conf, char * buff, int len,	\
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_mode(vector strvec, void *ptr, int *flags)
adddbf
+set_mode(vector strvec, void *ptr, int *flags, const char *file, int line_nr)
adddbf
 {
adddbf
 	mode_t mode;
adddbf
 	mode_t *mode_ptr = (mode_t *)ptr;
adddbf
@@ -742,7 +755,7 @@ set_mode(vector strvec, void *ptr, int *flags)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_uid(vector strvec, void *ptr, int *flags)
adddbf
+set_uid(vector strvec, void *ptr, int *flags, const char *file, int line_nr)
adddbf
 {
adddbf
 	uid_t uid;
adddbf
 	uid_t *uid_ptr = (uid_t *)ptr;
adddbf
@@ -767,7 +780,7 @@ set_uid(vector strvec, void *ptr, int *flags)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_gid(vector strvec, void *ptr, int *flags)
adddbf
+set_gid(vector strvec, void *ptr, int *flags, const char *file, int line_nr)
adddbf
 {
adddbf
 	gid_t gid;
adddbf
 	gid_t *gid_ptr = (gid_t *)ptr;
adddbf
@@ -834,7 +847,7 @@ declare_mp_attr_handler(gid, set_gid)
adddbf
 declare_mp_attr_snprint(gid, print_gid)
adddbf
 
adddbf
 static int
adddbf
-set_undef_off_zero(vector strvec, void *ptr)
adddbf
+set_undef_off_zero(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
@@ -876,7 +889,7 @@ declare_hw_handler(fast_io_fail, set_undef_off_zero)
adddbf
 declare_hw_snprint(fast_io_fail, print_undef_off_zero)
adddbf
 
adddbf
 static int
adddbf
-set_dev_loss(vector strvec, void *ptr)
adddbf
+set_dev_loss(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	unsigned int *uint_ptr = (unsigned int *)ptr;
adddbf
@@ -919,7 +932,7 @@ declare_hw_handler(eh_deadline, set_undef_off_zero)
adddbf
 declare_hw_snprint(eh_deadline, print_undef_off_zero)
adddbf
 
adddbf
 static int
adddbf
-set_pgpolicy(vector strvec, void *ptr)
adddbf
+set_pgpolicy(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
@@ -985,7 +998,8 @@ get_sys_max_fds(int *max_fds)
adddbf
 
adddbf
 
adddbf
 static int
adddbf
-max_fds_handler(struct config *conf, vector strvec)
adddbf
+max_fds_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 	int r = 0, max_fds;
adddbf
@@ -1030,7 +1044,7 @@ snprint_max_fds (struct config *conf, char * buff, int len, const void * data)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_rr_weight(vector strvec, void *ptr)
adddbf
+set_rr_weight(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
 	char * buff;
adddbf
@@ -1074,7 +1088,7 @@ declare_mp_handler(rr_weight, set_rr_weight)
adddbf
 declare_mp_snprint(rr_weight, print_rr_weight)
adddbf
 
adddbf
 static int
adddbf
-set_pgfailback(vector strvec, void *ptr)
adddbf
+set_pgfailback(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
 	char * buff;
adddbf
@@ -1124,7 +1138,7 @@ declare_mp_handler(pgfailback, set_pgfailback)
adddbf
 declare_mp_snprint(pgfailback, print_pgfailback)
adddbf
 
adddbf
 static int
adddbf
-no_path_retry_helper(vector strvec, void *ptr)
adddbf
+no_path_retry_helper(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
 	char * buff;
adddbf
@@ -1169,7 +1183,8 @@ declare_mp_handler(no_path_retry, no_path_retry_helper)
adddbf
 declare_mp_snprint(no_path_retry, print_no_path_retry)
adddbf
 
adddbf
 static int
adddbf
-def_log_checker_err_handler(struct config *conf, vector strvec)
adddbf
+def_log_checker_err_handler(struct config *conf, vector strvec,
adddbf
+			    const char *file, int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 
adddbf
@@ -1243,7 +1258,8 @@ print_reservation_key(char * buff, int len, struct be64 key, uint8_t flags,
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-def_reservation_key_handler(struct config *conf, vector strvec)
adddbf
+def_reservation_key_handler(struct config *conf, vector strvec,
adddbf
+			    const char *file, int line_nr)
adddbf
 {
adddbf
 	return set_reservation_key(strvec, &conf->reservation_key,
adddbf
 				   &conf->sa_flags,
adddbf
@@ -1260,7 +1276,8 @@ snprint_def_reservation_key (struct config *conf, char * buff, int len,
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-mp_reservation_key_handler(struct config *conf, vector strvec)
adddbf
+mp_reservation_key_handler(struct config *conf, vector strvec, const char *file,
adddbf
+			   int line_nr)
adddbf
 {
adddbf
 	struct mpentry * mpe = VECTOR_LAST_SLOT(conf->mptable);
adddbf
 	if (!mpe)
adddbf
@@ -1281,7 +1298,7 @@ snprint_mp_reservation_key (struct config *conf, char * buff, int len,
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-set_off_int_undef(vector strvec, void *ptr)
adddbf
+set_off_int_undef(vector strvec, void *ptr, const char *file, int line_nr)
adddbf
 {
adddbf
 	int *int_ptr = (int *)ptr;
adddbf
 	char * buff;
adddbf
@@ -1422,7 +1439,8 @@ declare_hw_snprint(recheck_wwid, print_yes_no_undef)
adddbf
 
adddbf
 
adddbf
 static int
adddbf
-def_uxsock_timeout_handler(struct config *conf, vector strvec)
adddbf
+def_uxsock_timeout_handler(struct config *conf, vector strvec, const char *file,
adddbf
+			   int line_nr)
adddbf
 {
adddbf
 	unsigned int uxsock_timeout;
adddbf
 	char *buff;
adddbf
@@ -1442,7 +1460,8 @@ def_uxsock_timeout_handler(struct config *conf, vector strvec)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-hw_vpd_vendor_handler(struct config *conf, vector strvec)
adddbf
+hw_vpd_vendor_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		      int line_nr)
adddbf
 {
adddbf
 	int i;
adddbf
 	char *buff;
adddbf
@@ -1482,7 +1501,8 @@ snprint_hw_vpd_vendor(struct config *conf, char * buff, int len,
adddbf
  * blacklist block handlers
adddbf
  */
adddbf
 static int
adddbf
-blacklist_handler(struct config *conf, vector strvec)
adddbf
+blacklist_handler(struct config *conf, vector strvec, const char*file,
adddbf
+		  int line_nr)
adddbf
 {
adddbf
 	if (!conf->blist_devnode)
adddbf
 		conf->blist_devnode = vector_alloc();
adddbf
@@ -1504,7 +1524,8 @@ blacklist_handler(struct config *conf, vector strvec)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-blacklist_exceptions_handler(struct config *conf, vector strvec)
adddbf
+blacklist_exceptions_handler(struct config *conf, vector strvec,
adddbf
+			     const char *file, int line_nr)
adddbf
 {
adddbf
 	if (!conf->elist_devnode)
adddbf
 		conf->elist_devnode = vector_alloc();
adddbf
@@ -1527,7 +1548,8 @@ blacklist_exceptions_handler(struct config *conf, vector strvec)
adddbf
 
adddbf
 #define declare_ble_handler(option)					\
adddbf
 static int								\
adddbf
-ble_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
+ble_ ## option ## _handler (struct config *conf, vector strvec,		\
adddbf
+			    const char *file, int line_nr)		\
adddbf
 {									\
adddbf
 	char * buff;							\
adddbf
 									\
adddbf
@@ -1543,7 +1565,8 @@ ble_ ## option ## _handler (struct config *conf, vector strvec)		\
adddbf
 
adddbf
 #define declare_ble_device_handler(name, option, vend, prod)		\
adddbf
 static int								\
adddbf
-ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec) \
adddbf
+ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec, \
adddbf
+					 const char *file, int line_nr)	\
adddbf
 {									\
adddbf
 	char * buff;							\
adddbf
 									\
adddbf
@@ -1583,13 +1606,15 @@ snprint_ble_simple (struct config *conf, char * buff, int len,
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-ble_device_handler(struct config *conf, vector strvec)
adddbf
+ble_device_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		   int line_nr)
adddbf
 {
adddbf
 	return alloc_ble_device(conf->blist_device);
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-ble_except_device_handler(struct config *conf, vector strvec)
adddbf
+ble_except_device_handler(struct config *conf, vector strvec, const char *file,
adddbf
+			  int line_nr)
adddbf
 {
adddbf
 	return alloc_ble_device(conf->elist_device);
adddbf
 }
adddbf
@@ -1623,7 +1648,8 @@ snprint_bled_product (struct config *conf, char * buff, int len,
adddbf
  * devices block handlers
adddbf
  */
adddbf
 static int
adddbf
-devices_handler(struct config *conf, vector strvec)
adddbf
+devices_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		int line_nr)
adddbf
 {
adddbf
 	if (!conf->hwtable)
adddbf
 		conf->hwtable = vector_alloc();
adddbf
@@ -1635,7 +1661,8 @@ devices_handler(struct config *conf, vector strvec)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-device_handler(struct config *conf, vector strvec)
adddbf
+device_handler(struct config *conf, vector strvec, const char *file,
adddbf
+	       int line_nr)
adddbf
 {
adddbf
 	struct hwentry * hwe;
adddbf
 
adddbf
@@ -1672,7 +1699,8 @@ declare_hw_snprint(hwhandler, print_str)
adddbf
  * overrides handlers
adddbf
  */
adddbf
 static int
adddbf
-overrides_handler(struct config *conf, vector strvec)
adddbf
+overrides_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		  int line_nr)
adddbf
 {
adddbf
 	if (!conf->overrides)
adddbf
 		conf->overrides = alloc_hwe();
adddbf
@@ -1689,7 +1717,8 @@ overrides_handler(struct config *conf, vector strvec)
adddbf
  * multipaths block handlers
adddbf
  */
adddbf
 static int
adddbf
-multipaths_handler(struct config *conf, vector strvec)
adddbf
+multipaths_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		   int line_nr)
adddbf
 {
adddbf
 	if (!conf->mptable)
adddbf
 		conf->mptable = vector_alloc();
adddbf
@@ -1701,7 +1730,8 @@ multipaths_handler(struct config *conf, vector strvec)
adddbf
 }
adddbf
 
adddbf
 static int
adddbf
-multipath_handler(struct config *conf, vector strvec)
adddbf
+multipath_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		  int line_nr)
adddbf
 {
adddbf
 	struct mpentry * mpe;
adddbf
 
adddbf
@@ -1730,7 +1760,8 @@ declare_mp_snprint(alias, print_str)
adddbf
  */
adddbf
 
adddbf
 static int
adddbf
-deprecated_handler(struct config *conf, vector strvec)
adddbf
+deprecated_handler(struct config *conf, vector strvec, const char *file,
adddbf
+		   int line_nr)
adddbf
 {
adddbf
 	char * buff;
adddbf
 
adddbf
diff --git a/libmultipath/parser.c b/libmultipath/parser.c
adddbf
index 341f2b80..29e8cee0 100644
adddbf
--- a/libmultipath/parser.c
adddbf
+++ b/libmultipath/parser.c
adddbf
@@ -562,7 +562,8 @@ process_stream(struct config *conf, FILE *stream, vector keywords,
adddbf
 						goto out;
adddbf
 				}
adddbf
 				if (keyword->handler) {
adddbf
-				    t = keyword->handler(conf, strvec);
adddbf
+				    t = keyword->handler(conf, strvec, file,
adddbf
+							 line_nr);
adddbf
 					r += t;
adddbf
 					if (t)
adddbf
 						condlog(1, "%s line %d, parsing failed: %s",
adddbf
diff --git a/libmultipath/parser.h b/libmultipath/parser.h
adddbf
index e8d89607..8b424b7a 100644
adddbf
--- a/libmultipath/parser.h
adddbf
+++ b/libmultipath/parser.h
adddbf
@@ -42,7 +42,7 @@
adddbf
 
adddbf
 /* keyword definition */
adddbf
 typedef int print_fn(struct config *, char *, int, const void *);
adddbf
-typedef int handler_fn(struct config *, vector);
adddbf
+typedef int handler_fn(struct config *, vector, const char *file, int line_nr);
adddbf
 
adddbf
 struct keyword {
adddbf
 	char *string;