diff options
author | Alasdair Kergon <agk@redhat.com> | 2009-07-16 00:52:06 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2009-07-16 00:52:06 +0000 |
commit | 9fac443591ed612a20d1d39719b3ad708369cce5 (patch) | |
tree | 7c7de4058edf4c6ea1af7be971fd90303337de55 /libdm/misc | |
parent | d917192f0010bf80315ba4aa4f6625e2a0ac60fd (diff) | |
download | lvm2-9fac443591ed612a20d1d39719b3ad708369cce5.tar.gz lvm2-9fac443591ed612a20d1d39719b3ad708369cce5.tar.xz lvm2-9fac443591ed612a20d1d39719b3ad708369cce5.zip |
Add log_errno to set a specific errno and replace log_error in due course.
Diffstat (limited to 'libdm/misc')
-rw-r--r-- | libdm/misc/dm-logging.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libdm/misc/dm-logging.h b/libdm/misc/dm-logging.h index ee3ed34e..13ab8047 100644 --- a/libdm/misc/dm-logging.h +++ b/libdm/misc/dm-logging.h @@ -21,15 +21,16 @@ extern dm_log_fn dm_log; extern dm_log_with_errno_fn dm_log_with_errno; -#define LOG_MESG(l, f, ln, x...) \ +#define LOG_MESG(l, f, ln, e, x...) \ do { \ if (dm_log_is_non_default()) \ dm_log(l, f, ln, ## x); \ else \ - dm_log_with_errno(l, f, ln, 0, ## x); \ + dm_log_with_errno(l, f, ln, e, ## x); \ } while (0) -#define LOG_LINE(l, x...) LOG_MESG(l, __FILE__, __LINE__, ## x) +#define LOG_LINE(l, x...) LOG_MESG(l, __FILE__, __LINE__, 0, ## x) +#define LOG_LINE_WITH_ERRNO(l, e, x...) LOG_MESG(l, __FILE__, __LINE__, e, ## x) #include "log.h" |