diff mbox series

[5/5] libmpathpersist: cleanup mpathpr.h

Message ID 20211216125502.15867-6-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:55 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

>From now on this header contains only symbols that need to be
accessed from multiple sources of libmpathpersist, but not from
libmultipath or other source files (those go into
libmpathpersist_int.h).

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmpathpersist/mpath_persist_int.c | 14 +++++++++++
 libmpathpersist/mpathpr.h           | 37 ++++-------------------------
 2 files changed, 18 insertions(+), 33 deletions(-)

Comments

Martin Wilck Dec. 17, 2021, 3:12 p.m. UTC | #1
On Thu, 2021-12-16 at 13:55 +0100, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> From now on this header contains only symbols that need to be
> accessed from multiple sources of libmpathpersist, but not from
> libmultipath or other source files (those go into
> libmpathpersist_int.h).
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>

This patch causes a build-time error under Alpine (uclibc), which
is trivially fixed by adding an "#include <string.h>" in
mpath_updatepr.c. Unless you insist that I resubmit, I'll just fix it
up locally once it's reviewed.

Martin

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/libmpathpersist/mpath_persist_int.c b/libmpathpersist/mpath_persist_int.c
index 91bc35a..c6fc287 100644
--- a/libmpathpersist/mpath_persist_int.c
+++ b/libmpathpersist/mpath_persist_int.c
@@ -33,7 +33,21 @@ 
 #include "mpathpr.h"
 #include "mpath_pr_ioctl.h"
 
+struct prout_param {
+	char dev[FILE_NAME_SIZE];
+	int rq_servact;
+	int rq_scope;
+	unsigned int rq_type;
+	struct prout_param_descriptor  *paramp;
+	int noisy;
+	int status;
+};
 
+struct threadinfo {
+	int status;
+	pthread_t id;
+	struct prout_param param;
+};
 
 static int mpath_send_prin_activepath (char * dev, int rq_servact,
 				struct prin_resp * resp, int noisy)
diff --git a/libmpathpersist/mpathpr.h b/libmpathpersist/mpathpr.h
index 59411e6..39a7d8e 100644
--- a/libmpathpersist/mpathpr.h
+++ b/libmpathpersist/mpathpr.h
@@ -1,42 +1,13 @@ 
 #ifndef MPATHPR_H
 #define MPATHPR_H
 
-#include "structs.h" /* FILE_NAME_SIZE */
-
-struct prin_param {
-	char dev[FILE_NAME_SIZE];
-	int rq_servact;
-	struct prin_resp *resp;
-	int noisy;
-	int status;
-};
-
-struct prout_param {
-	char dev[FILE_NAME_SIZE];
-	int rq_servact;
-	int rq_scope;
-	unsigned int rq_type;
-	struct prout_param_descriptor  *paramp;
-	int noisy;
-	int status;
-};
-
-struct threadinfo {
-	int status;
-	pthread_t id;
-	struct prout_param param;
-};
-
-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 * _mpath_pr_update (void *arg);
-void dumpHex(const char* , int len, int no_ascii);
+/*
+ * This header file contains symbols that are only used by
+ * libmpathpersist internally.
+ */
 
 int update_prflag(char *mapname, int set);
 int update_prkey_flags(char *mapname, uint64_t prkey, uint8_t sa_flags);
 #define update_prkey(mapname, prkey) update_prkey_flags(mapname, prkey, 0)
-void * mpath_alloc_prin_response(int prin_sa);
-int update_map_pr(struct multipath *mpp);
 
 #endif