mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
Move pr_ helpers to log.[ch]
This is a place where they should belong to. util.c is too big already. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
14
log.c
14
log.c
@@ -16,10 +16,7 @@
|
||||
#include "types.h"
|
||||
#include "util.h"
|
||||
|
||||
/*
|
||||
* Note pr_ helpers rely on this
|
||||
* descriptor!
|
||||
*/
|
||||
/* Note pr_ helpers rely on this descriptor! */
|
||||
static int logfd = STDERR_FILENO;
|
||||
|
||||
int get_logfd(void)
|
||||
@@ -69,3 +66,12 @@ void fini_log(void)
|
||||
|
||||
logfd = STDERR_FILENO;
|
||||
}
|
||||
|
||||
void printk(const char *format, ...)
|
||||
{
|
||||
va_list params;
|
||||
|
||||
va_start(params, format);
|
||||
vdprintf(get_logfd(), format, params);
|
||||
va_end(params);
|
||||
}
|
||||
|
Reference in New Issue
Block a user