diff mbox series

[2/5] multipathd: remove duplicate definitions from main.h

Message ID 20211216125502.15867-3-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series libmpathpersist: cleanup ABI and headers | expand

Commit Message

Martin Wilck Dec. 16, 2021, 12:54 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

We shouldn't define function prototypes in more than a single place.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmpathpersist/mpath_persist_int.h | 10 +++++++++-
 multipathd/main.c                   |  3 +++
 multipathd/main.h                   | 15 +--------------
 3 files changed, 13 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/libmpathpersist/mpath_persist_int.h b/libmpathpersist/mpath_persist_int.h
index 58d9c33..3145753 100644
--- a/libmpathpersist/mpath_persist_int.h
+++ b/libmpathpersist/mpath_persist_int.h
@@ -1,7 +1,10 @@ 
 #ifndef _MPATH_PERSIST_INT_H
 #define _MPATH_PERSIST_INT_H
 
-struct multipath;
+/*
+ * This header file contains symbols that are used by multipath-tools
+ * but aren't part of the public libmpathpersist API.
+ */
 
 void * mpath_alloc_prin_response(int prin_sa);
 int do_mpath_persistent_reserve_in(vector curmp, vector pathvec,
@@ -13,5 +16,10 @@  int do_mpath_persistent_reserve_out(vector curmp, vector pathvec, int fd,
 				    unsigned int rq_type,
 				    struct prout_param_descriptor *paramp,
 				    int noisy);
+int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp * resp, int noisy);
+int prout_do_scsi_ioctl( char * dev, int rq_servact, int rq_scope,
+			 unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy);
+void dumpHex(const char* , int len, int no_ascii);
+int update_map_pr(struct multipath *mpp);
 
 #endif /* _MPATH_PERSIST_INT_H */
diff --git a/multipathd/main.c b/multipathd/main.c
index 1db34ac..8926cbb 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -89,6 +89,9 @@ 
 #define CMDSIZE 160
 #define MSG_SIZE 32
 
+int mpath_pr_event_handle(struct path *pp);
+void * mpath_pr_event_handler_fn (void * );
+
 #define LOG_MSG(lvl, pp)					\
 do {								\
 	if (pp->mpp && checker_selected(&pp->checker) &&	\
diff --git a/multipathd/main.h b/multipathd/main.h
index 8356b25..459c734 100644
--- a/multipathd/main.h
+++ b/multipathd/main.h
@@ -27,9 +27,6 @@  enum remove_path_result {
 				      * because the path was also removed */
 };
 
-struct prout_param_descriptor;
-struct prin_resp;
-
 extern pid_t daemon_pid;
 extern int uxsock_timeout;
 
@@ -44,17 +41,7 @@  int ev_remove_path (struct path *, struct vectors *, int);
 int ev_add_map (char *, const char *, struct vectors *);
 int ev_remove_map (char *, char *, int, struct vectors *);
 int flush_map(struct multipath *, struct vectors *, int);
-void * mpath_alloc_prin_response(int prin_sa);
-int prin_do_scsi_ioctl(char *, int rq_servact, struct prin_resp * resp,
-		       int noisy);
-void dumpHex(const char * , int len, int no_ascii);
-int prout_do_scsi_ioctl(char * , int rq_servact, int rq_scope,
-			unsigned int rq_type,
-			struct prout_param_descriptor *param, int noisy);
-int mpath_pr_event_handle(struct path *pp);
-void * mpath_pr_event_handler_fn (void * );
-int update_map_pr(struct multipath *mpp);
-void * mpath_pr_event_handler_fn (void * pathp );
+
 void handle_signals(bool);
 int __setup_multipath (struct vectors * vecs, struct multipath * mpp,
 		       int reset);