mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
dmeventd: fix linking with libdevmapper
Since dmeventd is 'libdm' based project, it needs to link
libdm library instead of its internal version
An external users may provide plugins loadeable by dmeventd.
So external user of libdevmapper-event library has no other option
then to link with released libdevmapper library.
The complexity comes with lvm2 plugins.
The lvm2 plugin itself uses internal version of device_mapper,
but libdevmapper-event usage is libdm based - so there needs to be avoided
any breakage on compatibility of internal i.e. dm_task_run structures.
TODO: most likely dmeventd itself should be moved into libdm/dm-tools dir,
and only lvm2 plugins should be created as part of lvm project,
but those still need to link with libdevmapper.
(cherry picked from commit 035a7b9a4b
)
This commit is contained in:
parent
48a7502c57
commit
530b2df463
@ -57,8 +57,7 @@ all: device-mapper
|
|||||||
device-mapper: $(TARGETS)
|
device-mapper: $(TARGETS)
|
||||||
|
|
||||||
CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS)
|
CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS)
|
||||||
LIBS += $(PTHREAD_LIBS)
|
LIBS += $(PTHREAD_LIBS) -L$(top_builddir)/libdm -ldevmapper
|
||||||
LIBS += $(INTERNAL_LIBS)
|
|
||||||
|
|
||||||
dmeventd: $(LIB_SHARED) dmeventd.o
|
dmeventd: $(LIB_SHARED) dmeventd.o
|
||||||
@echo " [CC] $@"
|
@echo " [CC] $@"
|
||||||
|
@ -16,14 +16,13 @@
|
|||||||
* dmeventd - dm event daemon to monitor active mapped devices
|
* dmeventd - dm event daemon to monitor active mapped devices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device_mapper/misc/dmlib.h"
|
|
||||||
#include "base/memory/zalloc.h"
|
|
||||||
#include "device_mapper/misc/dm-logging.h"
|
|
||||||
|
|
||||||
#include "daemons/dmeventd/libdevmapper-event.h"
|
#include "configure.h"
|
||||||
|
#include "libdevmapper-event.h"
|
||||||
#include "dmeventd.h"
|
#include "dmeventd.h"
|
||||||
|
|
||||||
#include "tools/tool.h"
|
#include "libdm/misc/dm-logging.h"
|
||||||
|
#include "base/memory/zalloc.h"
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@ -35,6 +34,8 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <arpa/inet.h> /* for htonl, ntohl */
|
#include <arpa/inet.h> /* for htonl, ntohl */
|
||||||
#include <fcntl.h> /* for musl libc */
|
#include <fcntl.h> /* for musl libc */
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
/*
|
/*
|
||||||
@ -62,8 +63,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
#define DM_SIGNALED_EXIT 1
|
#define DM_SIGNALED_EXIT 1
|
||||||
#define DM_SCHEDULED_EXIT 2
|
#define DM_SCHEDULED_EXIT 2
|
||||||
static volatile sig_atomic_t _exit_now = 0; /* set to '1' when signal is given to exit */
|
static volatile sig_atomic_t _exit_now = 0; /* set to '1' when signal is given to exit */
|
||||||
|
@ -12,11 +12,12 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device_mapper/misc/dmlib.h"
|
#include "configure.h"
|
||||||
#include "base/memory/zalloc.h"
|
#include "libdevmapper-event.h"
|
||||||
#include "device_mapper/misc/dm-logging.h"
|
|
||||||
#include "daemons/dmeventd/libdevmapper-event.h"
|
|
||||||
#include "dmeventd.h"
|
#include "dmeventd.h"
|
||||||
|
#include "libdm/misc/dm-logging.h"
|
||||||
|
#include "base/memory/zalloc.h"
|
||||||
|
|
||||||
#include "lib/misc/intl.h"
|
#include "lib/misc/intl.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#ifndef LIB_DMEVENT_H
|
#ifndef LIB_DMEVENT_H
|
||||||
#define LIB_DMEVENT_H
|
#define LIB_DMEVENT_H
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user