mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Extract log.h and tweak funcs to be like lvm2 ones.
This commit is contained in:
parent
5c9e27f347
commit
ec36089afd
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "libdm-targets.h"
|
#include "libdm-targets.h"
|
||||||
#include "libdm-common.h"
|
#include "libdm-common.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#ifdef DM_COMPAT
|
#ifdef DM_COMPAT
|
||||||
# include "libdm-compat.h"
|
# include "libdm-compat.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "libdm-targets.h"
|
#include "libdm-targets.h"
|
||||||
#include "libdm-common.h"
|
#include "libdm-common.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -9,21 +9,6 @@
|
|||||||
|
|
||||||
#include "libdevmapper.h"
|
#include "libdevmapper.h"
|
||||||
|
|
||||||
#define _LOG_DEBUG 7
|
|
||||||
#define _LOG_INFO 6
|
|
||||||
#define _LOG_NOTICE 5
|
|
||||||
#define _LOG_WARN 4
|
|
||||||
#define _LOG_ERR 3
|
|
||||||
#define _LOG_FATAL 2
|
|
||||||
|
|
||||||
extern dm_log_fn _log;
|
|
||||||
|
|
||||||
#define log_error(msg, x...) _log(_LOG_ERR, __FILE__, __LINE__, msg, ## x)
|
|
||||||
#define log_print(msg, x...) _log(_LOG_WARN, __FILE__, __LINE__, msg, ## x)
|
|
||||||
#define log_verbose(msg, x...) _log(_LOG_NOTICE, __FILE__, __LINE__, msg, ## x)
|
|
||||||
#define log_very_verbose(msg, x...) _log(_LOG_INFO, __FILE__, __LINE__, msg, ## x)
|
|
||||||
#define log_debug(msg, x...) _log(_LOG_DEBUG, __FILE__, __LINE__, msg, ## x)
|
|
||||||
|
|
||||||
struct target *create_target(uint64_t start,
|
struct target *create_target(uint64_t start,
|
||||||
uint64_t len,
|
uint64_t len,
|
||||||
const char *type, const char *params);
|
const char *type, const char *params);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libdevmapper.h"
|
#include "libdevmapper.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user