1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

dmeventd: use matching function

Respect lvm2_log_fn prototype. The idea of 'reusing' print_log with
plain cast is causing very strange crashes with some older 'gcc'  compilers.
So just do it cleanly...
This commit is contained in:
Zdenek Kabelac 2015-10-14 14:19:47 +02:00
parent 7c36d7c90c
commit a6d1c8ac65

View File

@ -34,6 +34,12 @@ static void *_lvm_handle = NULL;
DM_EVENT_LOG_FN("lvm")
static void lvm2_print_log(int level, const char *file, int line,
int dm_errno_or_class, const char *msg)
{
print_log(level, file, line, dm_errno_or_class, "%s", msg);
}
/*
* Currently only one event can be processed at a time.
*/
@ -56,7 +62,7 @@ int dmeventd_lvm2_init(void)
pthread_mutex_lock(&_register_mutex);
if (!_lvm_handle) {
lvm2_log_fn((lvm2_log_fn_t)print_log);
lvm2_log_fn(lvm2_print_log);
if (!(_lvm_handle = lvm2_init()))
goto out;