From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Tue, 11 Feb 2025 16:51:59 +0100 Subject: [PATCH] multipath-tools: move DEFAULT_SOCKET definition into Makefile.inc This enables configuring the socket name. Follow up patches will add more flexibility for configuring the sockets. Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski Signed-off-by: Benjamin Marzinski --- Makefile.inc | 4 +++- libmpathcmd/mpath_cmd.h | 1 - libmultipath/defaults.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 4c452159..3746ceee 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -82,6 +82,8 @@ includedir = $(prefix)/usr/include pkgconfdir = $(usrlibdir)/pkgconfig runtimedir = /$(RUN) +abstract_socket := /org/kernel/linux/storage/multipathd + GZIP = gzip -9 -c RM = rm -f LN = ln -sf @@ -122,7 +124,7 @@ WARNFLAGS := -Werror -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ -Wstrict-prototypes CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \ - -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" -DRUNTIME_DIR=\"$(runtimedir)\" \ + -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" -DRUNTIME_DIR=\"$(runtimedir)\" -DDEFAULT_SOCKET=\"$(abstract_socket)\" \ -MMD -MP BIN_CFLAGS = -fPIE -DPIE LIB_CFLAGS = -fPIC diff --git a/libmpathcmd/mpath_cmd.h b/libmpathcmd/mpath_cmd.h index ccfd35f2..8707a42a 100644 --- a/libmpathcmd/mpath_cmd.h +++ b/libmpathcmd/mpath_cmd.h @@ -30,7 +30,6 @@ extern "C" { #endif -#define DEFAULT_SOCKET "/org/kernel/linux/storage/multipathd" #define DEFAULT_REPLY_TIMEOUT 4000 diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h index 5e77387e..1ab5b99c 100644 --- a/libmultipath/defaults.h +++ b/libmultipath/defaults.h @@ -64,7 +64,6 @@ #define DEV_LOSS_TMO_UNSET 0U #define MAX_DEV_LOSS_TMO UINT_MAX #define DEFAULT_PIDFILE "/" RUN_DIR "/multipathd.pid" -#define DEFAULT_SOCKET "/org/kernel/linux/storage/multipathd" #define DEFAULT_CONFIGFILE "/etc/multipath.conf" #define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings" #define DEFAULT_WWIDS_FILE "/etc/multipath/wwids"