ewarn now goes to stderr to match portage behaviour.
This commit is contained in:
parent
405cea1f19
commit
5bb09b6587
@ -86,7 +86,9 @@ being green,
|
|||||||
.Fn ewarn
|
.Fn ewarn
|
||||||
being yellow and
|
being yellow and
|
||||||
.Fn eerror
|
.Fn eerror
|
||||||
being red. The number of real characters printed is returned.
|
being red.
|
||||||
|
einfo goes to stdout and the others go to stderr.
|
||||||
|
The number of real characters printed is returned.
|
||||||
.Fn ebegin
|
.Fn ebegin
|
||||||
is identical to
|
is identical to
|
||||||
.Fn einfo
|
.Fn einfo
|
||||||
|
@ -601,7 +601,7 @@ static int _ewarnvn (const char *__EINFO_RESTRICT fmt, va_list ap)
|
|||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
EINFOVN (stdout, ECOLOR_WARN);
|
EINFOVN (stderr, ECOLOR_WARN);
|
||||||
return (retval);
|
return (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -694,7 +694,7 @@ int ewarn (const char *__EINFO_RESTRICT fmt, ...)
|
|||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
elogv (LOG_WARNING, fmt, ap);
|
elogv (LOG_WARNING, fmt, ap);
|
||||||
retval = _ewarnvn (fmt, ap);
|
retval = _ewarnvn (fmt, ap);
|
||||||
retval += printf ("\n");
|
retval += fprintf (stderr, "\n");
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
LASTCMD ("ewarn");
|
LASTCMD ("ewarn");
|
||||||
@ -713,7 +713,7 @@ void ewarnx (const char *__EINFO_RESTRICT fmt, ...)
|
|||||||
elogv (LOG_WARNING, fmt, ap);
|
elogv (LOG_WARNING, fmt, ap);
|
||||||
retval = _ewarnvn (fmt, ap);
|
retval = _ewarnvn (fmt, ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
retval += printf ("\n");
|
retval += fprintf (stderr, "\n");
|
||||||
}
|
}
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -818,14 +818,12 @@ static int _do_eend (const char *cmd, int retval, const char *__EINFO_RESTRICT f
|
|||||||
va_list apc;
|
va_list apc;
|
||||||
|
|
||||||
if (fmt && *fmt != '\0' && retval != 0) {
|
if (fmt && *fmt != '\0' && retval != 0) {
|
||||||
|
fp = stderr;
|
||||||
va_copy (apc, ap);
|
va_copy (apc, ap);
|
||||||
if (strcmp (cmd, "ewend") == 0) {
|
if (strcmp (cmd, "ewend") == 0)
|
||||||
col = _ewarnvn (fmt, apc);
|
col = _ewarnvn (fmt, apc);
|
||||||
fp = stdout;
|
else
|
||||||
} else {
|
|
||||||
col = _eerrorvn (fmt, apc);
|
col = _eerrorvn (fmt, apc);
|
||||||
fp = stderr;
|
|
||||||
}
|
|
||||||
col += fprintf (fp, "\n");
|
col += fprintf (fp, "\n");
|
||||||
va_end (apc);
|
va_end (apc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user