[Mesa-dev] [PATCH 1/2] mesa: print a notice when loading a user defined drirc file

Edmondo Tommasina edmondo.tommasina at gmail.com
Sun Mar 26 20:31:24 UTC 2017


... and avoid the load of ~/.drirc to go unnoticed.
---
 src/mesa/drivers/dri/common/xmlconfig.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index d4649370ee..fef007996e 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -1015,6 +1015,10 @@ driParseConfigFiles(driOptionCache *cache, const driOptionCache *info,
         if (filenames[i] == NULL)
             continue;
 
+        if (i > 0 && access(filenames[i], R_OK) == 0)
+            fprintf(stderr, "ATTENTION: loading user defined drirc %s\n",
+                    filenames[i]);
+
         p = XML_ParserCreate (NULL); /* use encoding specified by file */
         XML_SetElementHandler (p, optConfStartElem, optConfEndElem);
         XML_SetUserData (p, &userData);
-- 
2.11.0



More information about the mesa-dev mailing list