Commit ee07e425 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

compel: print errors to stderr

After seeing a bunch of silent build failures, like this:

>   GEN      criu/pie/parasite-native-blob.h
> criu/pie/Makefile:121: recipe for target 'criu/pie/parasite-native-blob.h' failed

I finally took a look at why are they silent, only to discover that
compel prints errors to stdout, and of course its stdout is silenced
in criu/pie/Makefile (unless you run make with V=1, in which case
it prints tons and tons of very useful information). I am so shocked
by this evil plan!

Anyway, let's print errors to stderr like all sane programs do.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 9d622863
......@@ -106,8 +106,15 @@ err:
static void cli_log(unsigned int lvl, const char *fmt, va_list parms)
{
if (!pr_quelled(lvl))
vprintf(fmt, parms);
FILE *f = stdout;
if (pr_quelled(lvl))
return;
if ((lvl == LOG_ERROR) || (lvl == LOG_WARN))
f = stderr;
vfprintf(f, fmt, parms);
}
static int usage(int rc) {
......
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