From ec36089afd4c0efc678f8cc4a4dca06eee288b68 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 24 Feb 2004 18:50:09 +0000 Subject: [PATCH] Extract log.h and tweak funcs to be like lvm2 ones. --- libdm/ioctl/libdevmapper.c | 1 + libdm/libdm-common.c | 1 + libdm/libdm-common.h.in | 15 --------------- tools/dmsetup.c | 1 + 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/libdm/ioctl/libdevmapper.c b/libdm/ioctl/libdevmapper.c index 10bcba60a..9c2353140 100644 --- a/libdm/ioctl/libdevmapper.c +++ b/libdm/ioctl/libdevmapper.c @@ -6,6 +6,7 @@ #include "libdm-targets.h" #include "libdm-common.h" +#include "log.h" #ifdef DM_COMPAT # include "libdm-compat.h" diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 3b67a1b55..9bc6878a5 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -7,6 +7,7 @@ #include "libdm-targets.h" #include "libdm-common.h" #include "list.h" +#include "log.h" #include #include diff --git a/libdm/libdm-common.h.in b/libdm/libdm-common.h.in index 2eabe5ebb..482eebe82 100644 --- a/libdm/libdm-common.h.in +++ b/libdm/libdm-common.h.in @@ -9,21 +9,6 @@ #include "libdevmapper.h" -#define _LOG_DEBUG 7 -#define _LOG_INFO 6 -#define _LOG_NOTICE 5 -#define _LOG_WARN 4 -#define _LOG_ERR 3 -#define _LOG_FATAL 2 - -extern dm_log_fn _log; - -#define log_error(msg, x...) _log(_LOG_ERR, __FILE__, __LINE__, msg, ## x) -#define log_print(msg, x...) _log(_LOG_WARN, __FILE__, __LINE__, msg, ## x) -#define log_verbose(msg, x...) _log(_LOG_NOTICE, __FILE__, __LINE__, msg, ## x) -#define log_very_verbose(msg, x...) _log(_LOG_INFO, __FILE__, __LINE__, msg, ## x) -#define log_debug(msg, x...) _log(_LOG_DEBUG, __FILE__, __LINE__, msg, ## x) - struct target *create_target(uint64_t start, uint64_t len, const char *type, const char *params); diff --git a/tools/dmsetup.c b/tools/dmsetup.c index a51dac319..cec22e557 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -5,6 +5,7 @@ */ #include "libdevmapper.h" +#include "log.h" #include #include