[PATCH 24/41] libmultipath: rename macros starting with underscore

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

 



Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 libmultipath/checkers/directio.c     |  8 ++++----
 libmultipath/checkers/emc_clariion.c | 20 ++++++++++----------
 libmultipath/checkers/rdac.c         | 20 ++++++++++----------
 libmultipath/checkers/tur.c          | 10 +++++-----
 libmultipath/foreign/nvme.c          | 26 +++++++++++++-------------
 5 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
index 12b8be4..8e87878 100644
--- a/libmultipath/checkers/directio.c
+++ b/libmultipath/checkers/directio.c
@@ -49,11 +49,11 @@ enum {
 	MSG_DIRECTIO_BLOCKSIZE,
 };
 
-#define _IDX(x) (MSG_DIRECTIO_##x - CHECKER_FIRST_MSGID)
+#define IDX_(x) (MSG_DIRECTIO_##x - CHECKER_FIRST_MSGID)
 const char *libcheck_msgtable[] = {
-	[_IDX(UNKNOWN)] = " is not available",
-	[_IDX(PENDING)] = " is waiting on aio",
-	[_IDX(BLOCKSIZE)] = " cannot get blocksize, set default",
+	[IDX_(UNKNOWN)] = " is not available",
+	[IDX_(PENDING)] = " is waiting on aio",
+	[IDX_(BLOCKSIZE)] = " cannot get blocksize, set default",
 	NULL,
 };
 
diff --git a/libmultipath/checkers/emc_clariion.c b/libmultipath/checkers/emc_clariion.c
index 04635b5..bf0baab 100644
--- a/libmultipath/checkers/emc_clariion.c
+++ b/libmultipath/checkers/emc_clariion.c
@@ -57,20 +57,20 @@ enum {
 	MSG_CLARIION_PASSIVE_GOOD,
 };
 
-#define _IDX(x) (MSG_CLARIION_ ## x - CHECKER_FIRST_MSGID)
+#define IDX_(x) (MSG_CLARIION_ ## x - CHECKER_FIRST_MSGID)
 const char *libcheck_msgtable[] = {
-	[_IDX(QUERY_FAILED)] = ": sending query command failed",
-	[_IDX(QUERY_ERROR)] = ": query command indicates error",
-	[_IDX(PATH_CONFIG)] =
+	[IDX_(QUERY_FAILED)] = ": sending query command failed",
+	[IDX_(QUERY_ERROR)] = ": query command indicates error",
+	[IDX_(PATH_CONFIG)] =
 	": Path not correctly configured for failover",
-	[_IDX(UNIT_REPORT)] =
+	[IDX_(UNIT_REPORT)] =
 	": Path unit report page in unknown format",
-	[_IDX(PATH_NOT_AVAIL)] =
+	[IDX_(PATH_NOT_AVAIL)] =
 	": Path not available for normal operations",
-	[_IDX(LUN_UNBOUND)] = ": Logical Unit is unbound or LUNZ",
-	[_IDX(WWN_CHANGED)] = ": Logical Unit WWN has changed",
-	[_IDX(READ_ERROR)] = ": Read error",
-	[_IDX(PASSIVE_GOOD)] = ": Active path is healthy",
+	[IDX_(LUN_UNBOUND)] = ": Logical Unit is unbound or LUNZ",
+	[IDX_(WWN_CHANGED)] = ": Logical Unit WWN has changed",
+	[IDX_(READ_ERROR)] = ": Read error",
+	[IDX_(PASSIVE_GOOD)] = ": Active path is healthy",
 	NULL,
 };
 
diff --git a/libmultipath/checkers/rdac.c b/libmultipath/checkers/rdac.c
index 9a3860f..87b8872 100644
--- a/libmultipath/checkers/rdac.c
+++ b/libmultipath/checkers/rdac.c
@@ -234,19 +234,19 @@ enum {
 	RDAC_MSGID_INQUIRY_FAILED,
 };
 
-#define _IDX(x) (RDAC_MSGID_##x - CHECKER_FIRST_MSGID)
+#define IDX_(x) (RDAC_MSGID_##x - CHECKER_FIRST_MSGID)
 const char *libcheck_msgtable[] = {
-	[_IDX(NOT_CONN)] = MSG_RDAC_DOWN_TYPE("lun not connected"),
-	[_IDX(IN_STARTUP)] = MSG_RDAC_DOWN_TYPE("ctlr is in startup sequence"),
-	[_IDX(NON_RESPONSIVE)] =
+	[IDX_(NOT_CONN)] = MSG_RDAC_DOWN_TYPE("lun not connected"),
+	[IDX_(IN_STARTUP)] = MSG_RDAC_DOWN_TYPE("ctlr is in startup sequence"),
+	[IDX_(NON_RESPONSIVE)] =
 	MSG_RDAC_DOWN_TYPE("non-responsive to queries"),
-	[_IDX(IN_RESET)] = MSG_RDAC_DOWN_TYPE("ctlr held in reset"),
-	[_IDX(FW_DOWNLOADING)] =
+	[IDX_(IN_RESET)] = MSG_RDAC_DOWN_TYPE("ctlr held in reset"),
+	[IDX_(FW_DOWNLOADING)] =
 	MSG_RDAC_DOWN_TYPE("ctlr firmware downloading"),
-	[_IDX(QUIESCED)] = MSG_RDAC_DOWN_TYPE("ctlr quiesced by admin request"),
-	[_IDX(SERVICE_MODE)] = MSG_RDAC_DOWN_TYPE("ctlr is in service mode"),
-	[_IDX(UNAVAILABLE)] = MSG_RDAC_DOWN_TYPE("ctlr is unavailable"),
-	[_IDX(INQUIRY_FAILED)] = MSG_RDAC_DOWN_TYPE("inquiry failed"),
+	[IDX_(QUIESCED)] = MSG_RDAC_DOWN_TYPE("ctlr quiesced by admin request"),
+	[IDX_(SERVICE_MODE)] = MSG_RDAC_DOWN_TYPE("ctlr is in service mode"),
+	[IDX_(UNAVAILABLE)] = MSG_RDAC_DOWN_TYPE("ctlr is unavailable"),
+	[IDX_(INQUIRY_FAILED)] = MSG_RDAC_DOWN_TYPE("inquiry failed"),
 	NULL,
 };
 
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index 2800446..a2905af 100644
--- a/libmultipath/checkers/tur.c
+++ b/libmultipath/checkers/tur.c
@@ -35,12 +35,12 @@ enum {
 	MSG_TUR_TRANSITIONING,
 };
 
-#define _IDX(x) (MSG_ ## x - CHECKER_FIRST_MSGID)
+#define IDX_(x) (MSG_ ## x - CHECKER_FIRST_MSGID)
 const char *libcheck_msgtable[] = {
-	[_IDX(TUR_RUNNING)] = " still running",
-	[_IDX(TUR_TIMEOUT)] = " timed out",
-	[_IDX(TUR_FAILED)] = " failed to initialize",
-	[_IDX(TUR_TRANSITIONING)] = " reports path is transitioning",
+	[IDX_(TUR_RUNNING)] = " still running",
+	[IDX_(TUR_TIMEOUT)] = " timed out",
+	[IDX_(TUR_FAILED)] = " failed to initialize",
+	[IDX_(TUR_TRANSITIONING)] = " reports path is transitioning",
 	NULL,
 };
 
diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c
index 6f2d880..9b26764 100644
--- a/libmultipath/foreign/nvme.c
+++ b/libmultipath/foreign/nvme.c
@@ -955,18 +955,18 @@ void release_paths(__attribute__((unused)) const struct context *ctx,
 }
 
 /* compile-time check whether all methods are present and correctly typed */
-#define _METHOD_INIT(x) .x = x
+#define METHOD_INIT(x) .x = x
 static struct foreign __methods __attribute__((unused)) = {
-	_METHOD_INIT(init),
-	_METHOD_INIT(cleanup),
-	_METHOD_INIT(change),
-	_METHOD_INIT(delete),
-	_METHOD_INIT(delete_all),
-	_METHOD_INIT(check),
-	_METHOD_INIT(lock),
-	_METHOD_INIT(unlock),
-	_METHOD_INIT(get_multipaths),
-	_METHOD_INIT(release_multipaths),
-	_METHOD_INIT(get_paths),
-	_METHOD_INIT(release_paths),
+	METHOD_INIT(init),
+	METHOD_INIT(cleanup),
+	METHOD_INIT(change),
+	METHOD_INIT(delete),
+	METHOD_INIT(delete_all),
+	METHOD_INIT(check),
+	METHOD_INIT(lock),
+	METHOD_INIT(unlock),
+	METHOD_INIT(get_multipaths),
+	METHOD_INIT(release_multipaths),
+	METHOD_INIT(get_paths),
+	METHOD_INIT(release_paths),
 };
-- 
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