diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2013-08-28 14:23:46 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2013-08-28 14:23:46 -0500 |
commit | a78b18e291bd7f55b176958074f41327f2d0e196 (patch) | |
tree | 5b0827a5a0212ac642f8e15a9dc7320905581e00 /src/libeinfo/libeinfo.c | |
parent | 72b58b9e6b7271bd4b20933b2992d55f8b4d31b4 (diff) |
libeinfo: suppress output for eerror* functions
This makes the eerror* functions honor the EINFO_QUIET environment
variable like the einfo* and ewarn* functions.
X-Gentoo-Bug: 482396
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
Diffstat (limited to 'src/libeinfo/libeinfo.c')
-rw-r--r-- | src/libeinfo/libeinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c index d27bdb2f..7b1f2da5 100644 --- a/src/libeinfo/libeinfo.c +++ b/src/libeinfo/libeinfo.c @@ -674,6 +674,8 @@ eerrorn(const char *EINFO_RESTRICT fmt, ...) int retval; va_list ap; + if (!fmt || is_quiet()) + return 0; va_start(ap, fmt); retval = _eerrorvn(fmt, ap); va_end(ap); @@ -740,7 +742,7 @@ eerror(const char *EINFO_RESTRICT fmt, ...) int retval; va_list ap; - if (!fmt) + if (!fmt || is_quiet()) return 0; va_start(ap, fmt); elogv(LOG_ERR, fmt, ap); @@ -757,7 +759,7 @@ eerrorx(const char *EINFO_RESTRICT fmt, ...) { va_list ap; - if (fmt) { + if (fmt && !is_quiet()) { va_start(ap, fmt); elogv(LOG_ERR, fmt, ap); _eerrorvn(fmt, ap); |