summaryrefslogtreecommitdiff
path: root/libdm/misc
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2009-07-15 14:18:38 +0000
committerAlasdair Kergon <agk@redhat.com>2009-07-15 14:18:38 +0000
commiteac6599c5ec8374d775f149a90b4718e7f6c082c (patch)
treef0d0aef656bc58d7ca9c07e1ec2b336a21446135 /libdm/misc
parent9386a6847753dfd140ac17d75d2ea418df445670 (diff)
downloadlvm2-eac6599c5ec8374d775f149a90b4718e7f6c082c.tar.gz
New LOG_MESG macro to fix file/line number logging for memory leaks after
LOG_LINENO macro was added.
Diffstat (limited to 'libdm/misc')
-rw-r--r--libdm/misc/dm-logging.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libdm/misc/dm-logging.h b/libdm/misc/dm-logging.h
index d2f235917..ee3ed34ef 100644
--- a/libdm/misc/dm-logging.h
+++ b/libdm/misc/dm-logging.h
@@ -21,14 +21,16 @@
extern dm_log_fn dm_log;
extern dm_log_with_errno_fn dm_log_with_errno;
-#define LOG_LINE(l, x...) \
+#define LOG_MESG(l, f, ln, x...) \
do { \
if (dm_log_is_non_default()) \
- dm_log(l, __FILE__, __LINE__, ## x); \
+ dm_log(l, f, ln, ## x); \
else \
- dm_log_with_errno(l, __FILE__, __LINE__, 0, ## x); \
+ dm_log_with_errno(l, f, ln, 0, ## x); \
} while (0)
+#define LOG_LINE(l, x...) LOG_MESG(l, __FILE__, __LINE__, ## x)
+
#include "log.h"
#endif