* [gentoo-commits] proj/openrc:master commit in: man/, src/libeinfo/
@ 2011-08-22 17:56 William Hubbs
0 siblings, 0 replies; 4+ messages in thread
From: William Hubbs @ 2011-08-22 17:56 UTC (permalink / raw
To: gentoo-commits
commit: 4ee62c7903c65557c493f51d6703264a816156cd
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 22 17:22:48 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 17:39:26 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=4ee62c79
Libeinfo: do not suppress ewarn() messages
The ewarn() function was affected by the EINFO_QUIET environment
variable which lead to warning messages being suppressed. Warnings
should not be suppressed.
Reported-by: Hanno Boeck <hanno <AT> gentoo.org>
X-Gentoo-Bug: 380073
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380073
---
man/einfo.3 | 3 +--
src/libeinfo/libeinfo.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/man/einfo.3 b/man/einfo.3
index dcb576c..5dc86d0 100644
--- a/man/einfo.3
+++ b/man/einfo.3
@@ -105,8 +105,7 @@ and
respectively, but only work when
.Va EINFO_VERBOSE
is true. You can also make the
-.Fn einfo ,
-.Fn ewarn ,
+.Fn einfo
and
.Fn ebegin
functions silent by setting
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index 777c0f8..44d4c90 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -725,7 +725,7 @@ ewarn(const char *EINFO_RESTRICT fmt, ...)
int retval;
va_list ap;
- if (!fmt || is_quiet())
+ if (!fmt)
return 0;
va_start(ap, fmt);
elogv(LOG_WARNING, fmt, ap);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: man/, src/libeinfo/
@ 2013-08-27 15:43 William Hubbs
0 siblings, 0 replies; 4+ messages in thread
From: William Hubbs @ 2013-08-27 15:43 UTC (permalink / raw
To: gentoo-commits
commit: 72b58b9e6b7271bd4b20933b2992d55f8b4d31b4
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Aug 26 19:31:34 2013 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 15:26:48 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=72b58b9e
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
---
man/einfo.3 | 3 ++-
src/libeinfo/libeinfo.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/man/einfo.3 b/man/einfo.3
index f613df3..0af12a8 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 6f0ca76..d27bdb2 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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: man/, src/libeinfo/
@ 2013-08-28 19:37 William Hubbs
0 siblings, 0 replies; 4+ messages in thread
From: William Hubbs @ 2013-08-28 19:37 UTC (permalink / raw
To: gentoo-commits
commit: a78b18e291bd7f55b176958074f41327f2d0e196
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Aug 28 19:23:46 2013 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug 28 19:23:46 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=a78b18e2
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
---
man/einfo.3 | 1 +
src/libeinfo/libeinfo.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/man/einfo.3 b/man/einfo.3
index 0af12a8..31c4b68 100644
--- a/man/einfo.3
+++ b/man/einfo.3
@@ -107,6 +107,7 @@ respectively, but only work when
is true. You can also make the
.Fn einfo ,
.Fn ewarn ,
+.Fn eerror ,
and
.Fn ebegin
functions silent by setting
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index d27bdb2..7b1f2da 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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: man/, src/libeinfo/
@ 2013-09-03 18:11 William Hubbs
0 siblings, 0 replies; 4+ messages in thread
From: William Hubbs @ 2013-09-03 18:11 UTC (permalink / raw
To: gentoo-commits
commit: 2590bf7a2bc40e2fcd5cbe1f4f063d820c2c5438
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Sep 1 20:06:15 2013 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Sep 3 18:03:55 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=2590bf7a
libeinfo: add separate variable to suppress eerror messages
Add an EERROR_QUIET environment variable which works like EINFO_QUIET
but for the eerror functions. This will allow library consumers to
choose whether to suppress eerror messages separately from einfo and
ewarn messages.
X-Gentoo-Bug: 482396
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
---
man/einfo.3 | 7 ++++++-
src/libeinfo/libeinfo.c | 12 +++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/man/einfo.3 b/man/einfo.3
index 31c4b68..f7b1fd2 100644
--- a/man/einfo.3
+++ b/man/einfo.3
@@ -107,7 +107,6 @@ respectively, but only work when
is true. You can also make the
.Fn einfo ,
.Fn ewarn ,
-.Fn eerror ,
and
.Fn ebegin
functions silent by setting
@@ -186,6 +185,12 @@ when set to true makes the
and
.Fn einfon
family of functions quiet, so nothing is printed.
+.Va EERROR_QUIET
+when set to true makes the
+.Fn eerror
+and
+.Fn eerrorn
+family of functions quiet, so nothing is printed.
.Pp
.Va EINFO_VERBOSE
when set to true makes the
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index 7b1f2da..9791051 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -274,6 +274,12 @@ is_quiet(void)
}
static bool
+is_really_quiet(void)
+{
+ return yesno(getenv("EERROR_QUIET"));
+}
+
+static bool
is_verbose(void)
{
return yesno(getenv ("EINFO_VERBOSE"));
@@ -674,7 +680,7 @@ eerrorn(const char *EINFO_RESTRICT fmt, ...)
int retval;
va_list ap;
- if (!fmt || is_quiet())
+ if (!fmt || is_really_quiet())
return 0;
va_start(ap, fmt);
retval = _eerrorvn(fmt, ap);
@@ -742,7 +748,7 @@ eerror(const char *EINFO_RESTRICT fmt, ...)
int retval;
va_list ap;
- if (!fmt || is_quiet())
+ if (!fmt || is_really_quiet())
return 0;
va_start(ap, fmt);
elogv(LOG_ERR, fmt, ap);
@@ -759,7 +765,7 @@ eerrorx(const char *EINFO_RESTRICT fmt, ...)
{
va_list ap;
- if (fmt && !is_quiet()) {
+ if (fmt && !is_really_quiet()) {
va_start(ap, fmt);
elogv(LOG_ERR, fmt, ap);
_eerrorvn(fmt, ap);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-03 18:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 17:56 [gentoo-commits] proj/openrc:master commit in: man/, src/libeinfo/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2013-08-27 15:43 William Hubbs
2013-08-28 19:37 William Hubbs
2013-09-03 18:11 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox