From: Stefan Dirsch Date: Tue, 26 Aug 2014 20:47:51 +0000 (+0200) Subject: xmlconfig: suppress libGL warnings when LIBGL_DEBUG == "quiet" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49022a971390afda5ce1661c388b92ad3af6e1de;p=mesa.git xmlconfig: suppress libGL warnings when LIBGL_DEBUG == "quiet" Let's handle LIBGL_DEBUG env. variable in Mesa in a consistent way. Fixes: https://bugzilla.novell.com/show_bug.cgi?id=895730 Signed-off-by: Stefan Dirsch Reviewed-by: Courtney Goeltzenleuchter --- diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c index ce376475c3e..8e48522e2e7 100644 --- a/src/mesa/drivers/dri/common/xmlconfig.c +++ b/src/mesa/drivers/dri/common/xmlconfig.c @@ -429,8 +429,10 @@ static void __driUtilMessage(const char *f, ...) { va_list args; + const char *libgl_debug; - if (getenv("LIBGL_DEBUG")) { + libgl_debug=getenv("LIBGL_DEBUG"); + if (libgl_debug && !strstr(libgl_debug, "quiet")) { fprintf(stderr, "libGL: "); va_start(args, f); vfprintf(stderr, f, args);