[Cluster-devel] [PATCH 04/10] dlm_controld: put MAX_LINE in header file

Heming Zhao heming.zhao at suse.com
Sun Sep 19 06:43:16 UTC 2021


Signed-off-by: Heming Zhao <heming.zhao at suse.com>
---
 dlm_controld/config.c      | 4 ----
 dlm_controld/dlm_daemon.h  | 3 +++
 dlm_controld/node_config.c | 2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlm_controld/config.c b/dlm_controld/config.c
index 947480dabe85..d77f3826bfe6 100644
--- a/dlm_controld/config.c
+++ b/dlm_controld/config.c
@@ -21,10 +21,6 @@ master node=2 weight=1
 
 #endif
 
-/* The max line length in dlm.conf */
-
-#define MAX_LINE 256
-
 int get_weight(struct lockspace *ls, int nodeid)
 {
 	int i;
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index 436fc9109aa6..eae17a28c749 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -220,6 +220,9 @@ void log_level(char *name_in, uint32_t level_in, const char *fmt, ...);
 #define log_dlock(ls, fmt, args...) log_level((ls)->name, LOG_PLOCK|LOG_DEBUG, fmt, ##args)
 #define log_elock(ls, fmt, args...) log_level((ls)->name, LOG_PLOCK|LOG_ERR, fmt, ##args)
 
+/* The max line length in dlm.conf */
+#define MAX_LINE 256
+
 /* dlm_header types */
 enum {
 	DLM_MSG_PROTOCOL = 1,
diff --git a/dlm_controld/node_config.c b/dlm_controld/node_config.c
index fe794be72f22..0889451848b9 100644
--- a/dlm_controld/node_config.c
+++ b/dlm_controld/node_config.c
@@ -8,8 +8,6 @@
 
 #include "dlm_daemon.h"
 
-#define MAX_LINE 4096
-
 static struct node_config nc[MAX_NODES];
 
 static const struct node_config nc_default = {
-- 
2.32.0





More information about the Cluster-devel mailing list