[dm-devel] [PATCH 5/7] Move the declaration of mpath_mx_alloc_len to a header file

Bart Van Assche bart.vanassche at sandisk.com
Wed May 17 15:43:07 UTC 2017


This allows the compiler to verify consistency of declaration and
definition.

Signed-off-by: Bart Van Assche <bart.vanassche at sandisk.com>
---
 libmpathpersist/mpath_persist.h | 3 +++
 mpathpersist/main.c             | 1 -
 multipathd/main.c               | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmpathpersist/mpath_persist.h b/libmpathpersist/mpath_persist.h
index 79de5b5b..3faa8c9e 100644
--- a/libmpathpersist/mpath_persist.h
+++ b/libmpathpersist/mpath_persist.h
@@ -81,6 +81,9 @@ extern "C" {
 
 
 
+extern unsigned int mpath_mx_alloc_len;
+
+
 
 struct prin_readdescr
 {
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
index 2e0aba3c..9de52b98 100644
--- a/mpathpersist/main.c
+++ b/mpathpersist/main.c
@@ -40,7 +40,6 @@ void mpath_print_transport_id(struct prin_fulldescr *fdesc);
 int construct_transportid(const char * inp, struct transportid transid[], int num_transportids);
 
 int logsink;
-unsigned int mpath_mx_alloc_len;
 struct config *multipath_conf;
 
 struct config *get_multipath_config(void)
diff --git a/multipathd/main.c b/multipathd/main.c
index b167cb4c..81c76cab 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -104,8 +104,6 @@ struct mpath_event_param
 	struct multipath *mpp;
 };
 
-unsigned int mpath_mx_alloc_len;
-
 int logsink;
 int verbosity;
 int bindings_read_only;
-- 
2.12.2




More information about the dm-devel mailing list