[PATCH 33/41] libmpathpersist: rename functions with double leading underscore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also remove some superfluous "extern" qualifiers in mpath_persist.h.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 libmpathpersist/libmpathpersist.version |  6 ++--
 libmpathpersist/mpath_persist.c         | 22 +++++++-------
 libmpathpersist/mpath_persist.h         | 39 ++++++++++++-------------
 mpathpersist/main.c                     |  6 ++--
 4 files changed, 35 insertions(+), 38 deletions(-)

diff --git a/libmpathpersist/libmpathpersist.version b/libmpathpersist/libmpathpersist.version
index a8c6aae..f467d99 100644
--- a/libmpathpersist/libmpathpersist.version
+++ b/libmpathpersist/libmpathpersist.version
@@ -10,7 +10,7 @@
  *
  * See libmultipath.version for general policy about version numbers.
  */
-LIBMPATHPERSIST_2.1.0 {
+LIBMPATHPERSIST_3.0.0 {
 global:
 	/* public API as defined in mpath_persist.h */
 	libmpathpersist_exit;
@@ -19,10 +19,10 @@ global:
 	mpath_lib_init;
 	mpath_mx_alloc_len;
 	mpath_persistent_reserve_free_vecs;
-	__mpath_persistent_reserve_in;
+	mpath_persistent_reserve_in__;
 	mpath_persistent_reserve_in;
 	mpath_persistent_reserve_init_vecs;
-	__mpath_persistent_reserve_out;
+	mpath_persistent_reserve_out__;
 	mpath_persistent_reserve_out;
 local: *;
 };
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index 6cfcdde..ace91d7 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -74,7 +74,7 @@ int libmpathpersist_exit(void)
 static vector curmp;
 static vector pathvec;
 
-static void __mpath_persistent_reserve_free_vecs(vector curmp, vector pathvec)
+static void mpath_persistent_reserve_free_vecs__(vector curmp, vector pathvec)
 {
 	free_multipathvec(curmp, KEEP_PATHS);
 	free_pathvec(pathvec, FREE_PATHS);
@@ -82,11 +82,11 @@ static void __mpath_persistent_reserve_free_vecs(vector curmp, vector pathvec)
 
 void mpath_persistent_reserve_free_vecs(void)
 {
-	__mpath_persistent_reserve_free_vecs(curmp, pathvec);
+	mpath_persistent_reserve_free_vecs__(curmp, pathvec);
 	curmp = pathvec = NULL;
 }
 
-static int __mpath_persistent_reserve_init_vecs(vector *curmp_p,
+static int mpath_persistent_reserve_init_vecs__(vector *curmp_p,
 						vector *pathvec_p, int verbose)
 {
 	libmp_verbosity = verbose;
@@ -110,17 +110,17 @@ static int __mpath_persistent_reserve_init_vecs(vector *curmp_p,
 	return MPATH_PR_SUCCESS;
 
 err:
-	__mpath_persistent_reserve_free_vecs(*curmp_p, *pathvec_p);
+	mpath_persistent_reserve_free_vecs__(*curmp_p, *pathvec_p);
 	*curmp_p = *pathvec_p = NULL;
 	return MPATH_PR_DMMP_ERROR;
 }
 
 int mpath_persistent_reserve_init_vecs(int verbose)
 {
-	return __mpath_persistent_reserve_init_vecs(&curmp, &pathvec, verbose);
+	return mpath_persistent_reserve_init_vecs__(&curmp, &pathvec, verbose);
 }
 
-int __mpath_persistent_reserve_in (int fd, int rq_servact,
+int mpath_persistent_reserve_in__(int fd, int rq_servact,
 	struct prin_resp *resp, int noisy)
 {
 	return do_mpath_persistent_reserve_in(curmp, pathvec, fd, rq_servact,
@@ -128,7 +128,7 @@ int __mpath_persistent_reserve_in (int fd, int rq_servact,
 }
 
 
-int __mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
+int mpath_persistent_reserve_out__( int fd, int rq_servact, int rq_scope,
 	unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy)
 {
 	return do_mpath_persistent_reserve_out(curmp, pathvec, fd, rq_servact,
@@ -140,14 +140,14 @@ int mpath_persistent_reserve_in (int fd, int rq_servact,
 	struct prin_resp *resp, int noisy, int verbose)
 {
 	vector curmp = NULL, pathvec;
-	int ret = __mpath_persistent_reserve_init_vecs(&curmp, &pathvec,
+	int ret = mpath_persistent_reserve_init_vecs__(&curmp, &pathvec,
 						       verbose);
 
 	if (ret != MPATH_PR_SUCCESS)
 		return ret;
 	ret = do_mpath_persistent_reserve_in(curmp, pathvec, fd, rq_servact,
 					     resp, noisy);
-	__mpath_persistent_reserve_free_vecs(curmp, pathvec);
+	mpath_persistent_reserve_free_vecs__(curmp, pathvec);
 	return ret;
 }
 
@@ -155,13 +155,13 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
 	unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy, int verbose)
 {
 	vector curmp = NULL, pathvec;
-	int ret = __mpath_persistent_reserve_init_vecs(&curmp, &pathvec,
+	int ret = mpath_persistent_reserve_init_vecs__(&curmp, &pathvec,
 						       verbose);
 
 	if (ret != MPATH_PR_SUCCESS)
 		return ret;
 	ret = do_mpath_persistent_reserve_out(curmp, pathvec, fd, rq_servact,
 					      rq_scope, rq_type, paramp, noisy);
-	__mpath_persistent_reserve_free_vecs(curmp, pathvec);
+	mpath_persistent_reserve_free_vecs__(curmp, pathvec);
 	return ret;
 }
diff --git a/libmpathpersist/mpath_persist.h b/libmpathpersist/mpath_persist.h
index 9c88e15..d94205f 100644
--- a/libmpathpersist/mpath_persist.h
+++ b/libmpathpersist/mpath_persist.h
@@ -3,7 +3,6 @@
 #ifndef MPATH_PERSIST_H_INCLUDED
 #define MPATH_PERSIST_H_INCLUDED
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -81,12 +80,8 @@ extern "C" {
 #define MPATH_WWUI_DEVICE_NAME		0x00	/* World wide unique initiator device name */
 #define MPATH_WWUI_PORT_IDENTIFIER	0x40	/* World wide unique initiator port identifier	*/
 
-
-
 extern unsigned int mpath_mx_alloc_len;
 
-
-
 struct prin_readdescr
 {
 	uint32_t prgeneration;
@@ -183,7 +178,7 @@ struct prout_param_descriptor {		/* PROUT parameter descriptor */
  *
  * RETURNS: 0->Success, 1->Failed.
  */
-extern int libmpathpersist_init (void);
+int libmpathpersist_init(void);
 
 /*
  * DESCRIPTION :
@@ -197,7 +192,7 @@ extern int libmpathpersist_init (void);
  *
  * RETURNS: struct config ->Success, NULL->Failed.
  */
-extern struct config * mpath_lib_init (void);
+struct config *mpath_lib_init(void);
 
 
 /*
@@ -209,7 +204,7 @@ extern struct config * mpath_lib_init (void);
  *
  * RETURNS: 0->Success, 1->Failed.
  */
-extern int mpath_lib_exit (struct config *conf);
+int mpath_lib_exit(struct config *conf);
 
 /*
  * DESCRIPTION :
@@ -221,7 +216,7 @@ extern int mpath_lib_exit (struct config *conf);
  *
  * RETURNS: 0->Success, 1->Failed.
  */
-extern int libmpathpersist_exit (void);
+int libmpathpersist_exit(void);
 
 
 /*
@@ -241,8 +236,8 @@ extern int libmpathpersist_exit (void);
  *       above in RETURN_STATUS.
  *
  */
-extern int mpath_persistent_reserve_in (int fd, int rq_servact, struct prin_resp *resp,
-		int noisy, int verbose);
+int mpath_persistent_reserve_in(int fd, int rq_servact, struct prin_resp *resp,
+				int noisy, int verbose);
 
 /*
  * DESCRIPTION :
@@ -254,8 +249,8 @@ extern int mpath_persistent_reserve_in (int fd, int rq_servact, struct prin_resp
  * RESTRICTIONS:
  * This function uses static internal variables, and is not thread-safe.
  */
-extern int __mpath_persistent_reserve_in(int fd, int rq_servact,
-		struct prin_resp *resp, int noisy);
+int mpath_persistent_reserve_in__(int fd, int rq_servact,
+				  struct prin_resp *resp, int noisy);
 
 /*
  * DESCRIPTION :
@@ -279,9 +274,10 @@ extern int __mpath_persistent_reserve_in(int fd, int rq_servact,
  * RETURNS: MPATH_PR_SUCCESS if PR command successful else returns any of the status specified
  *       above in RETURN_STATUS.
  */
-extern int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
-		unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy,
-		int verbose);
+int mpath_persistent_reserve_out(int fd, int rq_servact, int rq_scope,
+				 unsigned int rq_type,
+				 struct prout_param_descriptor *paramp,
+				 int noisy, int verbose);
 /*
  * DESCRIPTION :
  * This function is like mpath_persistent_reserve_out(), except that it
@@ -292,15 +288,16 @@ extern int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
  * RESTRICTIONS:
  * This function uses static internal variables, and is not thread-safe.
  */
-extern int __mpath_persistent_reserve_out( int fd, int rq_servact, int rq_scope,
-		unsigned int rq_type, struct prout_param_descriptor *paramp,
-		int noisy);
+int mpath_persistent_reserve_out__(int fd, int rq_servact, int rq_scope,
+				   unsigned int rq_type,
+				   struct prout_param_descriptor *paramp,
+				   int noisy);
 
 /*
  * DESCRIPTION :
  * This function allocates data structures and performs basic initialization and
- * device discovery for later calls of __mpath_persistent_reserve_in() or
- * __mpath_persistent_reserve_out().
+ * device discovery for later calls of mpath_persistent_reserve_in__() or
+ * mpath_persistent_reserve_out__().
  * @verbose: Set verbosity level. Input argument. value:0 to 3. 0->disabled, 3->Max verbose
  *
  * RESTRICTIONS:
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
index b661790..efb46b9 100644
--- a/mpathpersist/main.c
+++ b/mpathpersist/main.c
@@ -505,7 +505,7 @@ static int handle_args(int argc, char * argv[], int nline)
 			goto out_fd;
 		}
 
-		ret = __mpath_persistent_reserve_in (fd, prin_sa, resp, noisy);
+		ret = mpath_persistent_reserve_in__(fd, prin_sa, resp, noisy);
 		if (ret != MPATH_PR_SUCCESS )
 		{
 			fprintf (stderr, "Persistent Reserve IN command failed\n");
@@ -575,8 +575,8 @@ static int handle_args(int argc, char * argv[], int nline)
 		}
 
 		/* PROUT commands other than 'register and move' */
-		ret = __mpath_persistent_reserve_out (fd, prout_sa, 0, prout_type,
-				paramp, noisy);
+		ret = mpath_persistent_reserve_out__(fd, prout_sa, 0, prout_type,
+						     paramp, noisy);
 		free_prout_param_descriptor(paramp);
 	}
 
-- 
2.46.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux