criu/compel/include/uapi/compel.h
Cyrill Gorcunov 1a30731b1f compel: Add callback-based log engine
pr_out is only special left in piegen engine, the rest use
compel's pr_x output. Probably we will need to enhance it
one day to make same close to what we have in criu.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00

25 lines
557 B
C

#ifndef UAPI_COMPEL_H__
#define UAPI_COMPEL_H__
#include <errno.h>
#include <stdarg.h>
#define COMPEL_TYPE_INT (1u << 0)
#define COMPEL_TYPE_LONG (1u << 1)
#define COMPEL_TYPE_GOTPCREL (1u << 2)
typedef struct {
unsigned int offset;
unsigned int type;
long addend;
long value;
} compel_reloc_t;
/*
* Logging
*/
typedef void (*compel_log_fn)(unsigned int lvl, const char *fmt, va_list parms);
extern void compel_log_init(compel_log_fn log_fn, unsigned int level);
extern unsigned int compel_log_get_loglevel(void);
#endif /* UAPI_COMPEL_H__ */