mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
cleanup: more readable code
This commit is contained in:
parent
8b9533f38f
commit
f4fb97c850
@ -49,10 +49,7 @@ static size_t _lvm_errmsg_len = 0;
|
|||||||
|
|
||||||
void init_log_fn(lvm2_log_fn_t log_fn)
|
void init_log_fn(lvm2_log_fn_t log_fn)
|
||||||
{
|
{
|
||||||
if (log_fn)
|
|
||||||
_lvm2_log_fn = log_fn;
|
_lvm2_log_fn = log_fn;
|
||||||
else
|
|
||||||
_lvm2_log_fn = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
#ifndef _LVM_LOGGING_H
|
#ifndef _LVM_LOGGING_H
|
||||||
#define _LVM_LOGGING_H
|
#define _LVM_LOGGING_H
|
||||||
|
|
||||||
|
__attribute__ ((format(printf, 5, 6)))
|
||||||
void print_log(int level, const char *file, int line, int dm_errno_or_class,
|
void print_log(int level, const char *file, int line, int dm_errno_or_class,
|
||||||
const char *format, ...)
|
const char *format, ...);
|
||||||
__attribute__ ((format(printf, 5, 6)));
|
|
||||||
|
|
||||||
#define LOG_LINE(l, x...) \
|
#define LOG_LINE(l, x...) \
|
||||||
print_log(l, __FILE__, __LINE__ , 0, ## x)
|
print_log(l, __FILE__, __LINE__ , 0, ## x)
|
||||||
|
Loading…
Reference in New Issue
Block a user