2
0
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:
Cyrill Gorcunov
2012-02-17 12:17:00 +04:00
parent 6a0b94e7d5
commit fe99f501ef
4 changed files with 43 additions and 47 deletions

14
log.c
View File

@@ -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);
}