From 38457e1be9c3363126eadc3e04ae8b8780832668 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 10 Feb 2014 14:51:14 +0100 Subject: [PATCH] libdevmapper-event: Print a deprecation warning for non-default plugins. --- daemons/dmeventd/libdevmapper-event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c index 1b5273ddf..db9200f91 100644 --- a/daemons/dmeventd/libdevmapper-event.c +++ b/daemons/dmeventd/libdevmapper-event.c @@ -619,6 +619,13 @@ int dm_event_register_handler(const struct dm_event_handler *dmevh) uuid = dm_task_get_uuid(dmt); + if (!strstr(dmevh->dso, "libdevmapper-event-lvm2thin.so") && + !strstr(dmevh->dso, "libdevmapper-event-lvm2snapshot.so") && + !strstr(dmevh->dso, "libdevmapper-event-lvm2mirror.so") && + !strstr(dmevh->dso, "libdevmapper-event-lvm2raid.so")) + log_warn("WARNING: %s: dmeventd plugins are deprecated", dmevh->dso); + + if ((err = _do_event(DM_EVENT_CMD_REGISTER_FOR_EVENT, dmevh->dmeventd_path, &msg, dmevh->dso, uuid, dmevh->mask, dmevh->timeout)) < 0) { log_error("%s: event registration failed: %s", -- 2.43.5