aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-08-26 14:31:34 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-08-27 10:26:48 -0500
commit72b58b9e6b7271bd4b20933b2992d55f8b4d31b4 (patch)
treea311312b7ec007fb845f658f2c31001373713d47
parent5c3e5d801b7ea536f6ea4a993076965c978f0e81 (diff)
Revert "Libeinfo: do not suppress ewarn() messages"
This reverts commit 4ee62c7903c65557c493f51d6703264a816156cd. The previously referenced commit broke consistency because ewarnx() was respecting the EINFO_QUIET environment setting, but after this commit, ewarn() was not. Also, due to discussion on the below referenced bugs, I think we do want to suppress warnings when EINFO_QUIET=yes. X-Gentoo-Bug: 482396 X-Gentoo-Bug: 439174 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439174
-rw-r--r--man/einfo.33
-rw-r--r--src/libeinfo/libeinfo.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/man/einfo.3 b/man/einfo.3
index f613df34..0af12a8b 100644
--- a/man/einfo.3
+++ b/man/einfo.3
@@ -105,7 +105,8 @@ and
respectively, but only work when
.Va EINFO_VERBOSE
is true. You can also make the
-.Fn einfo
+.Fn einfo ,
+.Fn ewarn ,
and
.Fn ebegin
functions silent by setting
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index 6f0ca766..d27bdb2f 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -705,7 +705,7 @@ ewarn(const char *EINFO_RESTRICT fmt, ...)
int retval;
va_list ap;
- if (!fmt)
+ if (!fmt || is_quiet())
return 0;
va_start(ap, fmt);
elogv(LOG_WARNING, fmt, ap);