Commit 95d62baa authored by Eric Engestrom's avatar Eric Engestrom

loader: deduplicate logger function declaration

Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@intel.com>
Reviewed-by: 's avatarEmil Velikov <emil.velikov@collabora.com>
parent eade6ffe
......@@ -68,7 +68,7 @@ static void default_logger(int level, const char *fmt, ...)
}
}
static void (*log_)(int level, const char *fmt, ...) = default_logger;
static loader_logger *log_ = default_logger;
int
loader_open_device(const char *device_name)
......@@ -491,7 +491,7 @@ out:
}
void
loader_set_logger(void (*logger)(int level, const char *fmt, ...))
loader_set_logger(loader_logger *logger)
{
log_ = logger;
}
......
......@@ -74,8 +74,9 @@ loader_get_user_preferred_fd(int default_fd, bool *different_device);
#define _LOADER_INFO 2 /* just useful info */
#define _LOADER_DEBUG 3 /* useful info for debugging */
typedef void loader_logger(int level, const char *fmt, ...);
void
loader_set_logger(void (*logger)(int level, const char *fmt, ...));
loader_set_logger(loader_logger *logger);
char *
loader_get_extensions_name(const char *driver_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment