mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: utilize SD_NOTIFY_SUPPORT
Update makefile and code to better utilize SD_NOTIFY_SUPPORT var.
This commit is contained in:
parent
ee97c5c633
commit
d8726b07c3
@ -50,8 +50,7 @@ INCLUDES += -I$(top_srcdir)/libdaemon/server
|
|||||||
LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
|
LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
|
||||||
LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS)
|
LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS)
|
||||||
|
|
||||||
ifneq (,$(firstword $(LIBSYSTEMD_LIBS)))
|
ifeq ("@SD_NOTIFY_SUPPORT@", "yes")
|
||||||
DEFS += -DUSE_SD_NOTIFY
|
|
||||||
CFLAGS += $(LIBSYSTEMD_CFLAGS)
|
CFLAGS += $(LIBSYSTEMD_CFLAGS)
|
||||||
LIBS += $(LIBSYSTEMD_LIBS)
|
LIBS += $(LIBSYSTEMD_LIBS)
|
||||||
endif
|
endif
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
#ifdef USE_SD_NOTIFY
|
#ifdef SD_NOTIFY_SUPPORT
|
||||||
#include <systemd/sd-daemon.h>
|
#include <systemd/sd-daemon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -6191,7 +6191,7 @@ static int main_loop(daemon_state *ds_arg)
|
|||||||
setup_worker_thread();
|
setup_worker_thread();
|
||||||
setup_restart();
|
setup_restart();
|
||||||
|
|
||||||
#ifdef USE_SD_NOTIFY
|
#ifdef SD_NOTIFY_SUPPORT
|
||||||
sd_notify(0, "READY=1");
|
sd_notify(0, "READY=1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -660,6 +660,9 @@
|
|||||||
/* Define to 1 to include the LVM readline shell. */
|
/* Define to 1 to include the LVM readline shell. */
|
||||||
#undef READLINE_SUPPORT
|
#undef READLINE_SUPPORT
|
||||||
|
|
||||||
|
/* Define to 1 to include code that uses sd_notify. */
|
||||||
|
#undef SD_NOTIFY_SUPPORT
|
||||||
|
|
||||||
/* Define to 1 to include built-in support for snapshots. */
|
/* Define to 1 to include built-in support for snapshots. */
|
||||||
#undef SNAPSHOT_INTERNAL
|
#undef SNAPSHOT_INTERNAL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user