diff mbox series

[37/41] multipathd: rename symbols with double leading underscore

Message ID 20240808152620.93965-38-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: comply with C library reserved names | expand

Commit Message

Martin Wilck Aug. 8, 2024, 3:26 p.m. UTC
Also remove last mentions of __setup_multipath(), which has been removed in
e5debe0 ("multipathd: don't modify the multipath device on show commands").

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/cli.c      |  2 +-
 multipathd/cli.h      |  6 +++---
 multipathd/dmevents.c |  2 +-
 multipathd/main.c     | 30 +++++++++++++++---------------
 multipathd/waiter.c   |  2 +-
 5 files changed, 21 insertions(+), 21 deletions(-)
diff mbox series

Patch

diff --git a/multipathd/cli.c b/multipathd/cli.c
index 0c89b7c..139a4c4 100644
--- a/multipathd/cli.c
+++ b/multipathd/cli.c
@@ -114,7 +114,7 @@  find_handler (uint32_t fp)
 }
 
 int
-__set_handler_callback (uint32_t fp, cli_handler *fn, bool locked)
+set_handler_callback__ (uint32_t fp, cli_handler *fn, bool locked)
 {
 	struct handler *h;
 
diff --git a/multipathd/cli.h b/multipathd/cli.h
index 2940832..dd26a2c 100644
--- a/multipathd/cli.h
+++ b/multipathd/cli.h
@@ -137,9 +137,9 @@  struct handler {
 };
 
 int alloc_handlers (void);
-int __set_handler_callback (uint32_t fp, cli_handler *fn, bool locked);
-#define set_handler_callback(fp, fn) __set_handler_callback(fp, fn, true)
-#define set_unlocked_handler_callback(fp, fn) __set_handler_callback(fp, fn, false)
+int set_handler_callback__ (uint32_t fp, cli_handler *fn, bool locked);
+#define set_handler_callback(fp, fn) set_handler_callback__(fp, fn, true)
+#define set_unlocked_handler_callback(fp, fn) set_handler_callback__(fp, fn, false)
 
 int get_cmdvec (char *cmd, vector *v, bool allow_incomplete);
 struct handler *find_handler_for_cmdvec(const struct _vector *v);
diff --git a/multipathd/dmevents.c b/multipathd/dmevents.c
index af1e12e..7a78b8f 100644
--- a/multipathd/dmevents.c
+++ b/multipathd/dmevents.c
@@ -202,7 +202,7 @@  fail:
 	return -1;
 }
 
-/* You must call __setup_multipath() after calling this function, to
+/* You must call setup_multipath() after calling this function, to
  * deal with any events that came in before the device was added */
 int watch_dmevents(char *name)
 {
diff --git a/multipathd/main.c b/multipathd/main.c
index bb19c97..229b516 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -131,7 +131,7 @@  static int poll_dmevents = 1;
 /* Don't access this variable without holding config_lock */
 static enum daemon_status running_state = DAEMON_INIT;
 /* Don't access this variable without holding config_lock */
-static bool __delayed_reconfig;
+static bool delayed_reconfig;
 /* Don't access this variable without holding config_lock */
 static enum force_reload_types reconfigure_pending = FORCE_RELOAD_NONE;
 pid_t daemon_pid;
@@ -243,7 +243,7 @@  static void config_cleanup(__attribute__((unused)) void *arg)
 	pthread_mutex_unlock(&config_lock);
 }
 
-#define __wait_for_state_change(condition, ms)				\
+#define wait_for_state_change__(condition, ms)				\
 	({								\
 		struct timespec tmo;					\
 		int rc = 0;						\
@@ -275,14 +275,14 @@  enum daemon_status wait_for_state_change_if(enum daemon_status oldstate,
 
 	pthread_mutex_lock(&config_lock);
 	pthread_cleanup_push(config_cleanup, NULL);
-	__wait_for_state_change(running_state == oldstate, ms);
+	wait_for_state_change__(running_state == oldstate, ms);
 	st = running_state;
 	pthread_cleanup_pop(1);
 	return st;
 }
 
 /* must be called with config_lock held */
-static void __post_config_state(enum daemon_status state)
+static void post_config_state__(enum daemon_status state)
 {
 	if (state != running_state && running_state != DAEMON_SHUTDOWN) {
 		enum daemon_status old_state = running_state;
@@ -299,7 +299,7 @@  void post_config_state(enum daemon_status state)
 {
 	pthread_mutex_lock(&config_lock);
 	pthread_cleanup_push(config_cleanup, NULL);
-	__post_config_state(state);
+	post_config_state__(state);
 	pthread_cleanup_pop(1);
 }
 
@@ -308,15 +308,15 @@  static bool unblock_reconfigure(void)
 	bool was_delayed;
 
 	pthread_mutex_lock(&config_lock);
-	was_delayed = __delayed_reconfig;
+	was_delayed = delayed_reconfig;
 	if (was_delayed) {
-		__delayed_reconfig = false;
+		delayed_reconfig = false;
 		/*
 		 * In IDLE state, make sure child() is woken up
 		 * Otherwise it will wake up when state switches to IDLE
 		 */
 		if (running_state == DAEMON_IDLE)
-			__post_config_state(DAEMON_CONFIGURE);
+			post_config_state__(DAEMON_CONFIGURE);
 	}
 	pthread_mutex_unlock(&config_lock);
 	if (was_delayed)
@@ -350,7 +350,7 @@  void schedule_reconfigure(enum force_reload_types requested_type)
 		break;
 	case DAEMON_IDLE:
 		reconfigure_pending = type;
-		__post_config_state(DAEMON_CONFIGURE);
+		post_config_state__(DAEMON_CONFIGURE);
 		break;
 	case DAEMON_CONFIGURE:
 	case DAEMON_RUNNING:
@@ -378,7 +378,7 @@  static enum daemon_status set_config_state(enum daemon_status state)
 	}
 
 	if (rc == 0 && running_state == DAEMON_IDLE && state != DAEMON_IDLE)
-		__post_config_state(state);
+		post_config_state__(state);
 	st = running_state;
 
 	pthread_cleanup_pop(1);
@@ -3749,17 +3749,17 @@  child (__attribute__((unused)) void *param)
 		       /*
 			* Check if another reconfigure request was scheduled
 			* while we last ran reconfigure().
-			* We have to test __delayed_reconfig here
+			* We have to test delayed_reconfig here
 			* to avoid a busy loop
 			*/
 		       (reconfigure_pending == FORCE_RELOAD_NONE
-			 || __delayed_reconfig))
+			 || delayed_reconfig))
 			pthread_cond_wait(&config_cond, &config_lock);
 
 		if (running_state != DAEMON_CONFIGURE &&
 		    running_state != DAEMON_SHUTDOWN)
 			/* This sets running_state to DAEMON_CONFIGURE */
-			__post_config_state(DAEMON_CONFIGURE);
+			post_config_state__(DAEMON_CONFIGURE);
 		state = running_state;
 		pthread_cleanup_pop(1);
 		if (state == DAEMON_SHUTDOWN)
@@ -3776,13 +3776,13 @@  child (__attribute__((unused)) void *param)
 			reload_type = reconfigure_pending == FORCE_RELOAD_YES ?
 				FORCE_RELOAD_YES : FORCE_RELOAD_WEAK;
 			reconfigure_pending = FORCE_RELOAD_NONE;
-			__delayed_reconfig = false;
+			delayed_reconfig = false;
 			pthread_mutex_unlock(&config_lock);
 
 			rc = reconfigure(vecs, reload_type);
 		} else {
 			pthread_mutex_lock(&config_lock);
-			__delayed_reconfig = true;
+			delayed_reconfig = true;
 			pthread_mutex_unlock(&config_lock);
 			condlog(3, "delaying reconfigure()");
 		}
diff --git a/multipathd/waiter.c b/multipathd/waiter.c
index 1dd93c5..f251c50 100644
--- a/multipathd/waiter.c
+++ b/multipathd/waiter.c
@@ -56,7 +56,7 @@  void stop_waiter_thread (struct multipath *mpp)
 			mpp->alias);
 		return;
 	}
-	/* Don't cancel yourself. __setup_multipath is called by
+	/* Don't cancel yourself. setup_multipath is called by
 	   by the waiter thread, and may remove a multipath device */
 	if (pthread_equal(mpp->waiter, pthread_self()))
 		return;