[Mesa-dev] [PATCH] dri/common: use sysconfdir when looking for drirc

Ilia Mirkin imirkin at alum.mit.edu
Sun Sep 13 12:41:05 PDT 2015


On Sun, Sep 13, 2015 at 12:55 PM, Marcin Ĺšlusarz
<marcin.slusarz at gmail.com> wrote:
> Useful when locally installed mesa has more quirks than the system one.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

[not sure if you can push, but if you can, hold off for a couple of days]

> ---
>  src/mesa/drivers/dri/common/Makefile.am | 1 +
>  src/mesa/drivers/dri/common/xmlconfig.c | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
> index b307f10..ea52cb5 100644
> --- a/src/mesa/drivers/dri/common/Makefile.am
> +++ b/src/mesa/drivers/dri/common/Makefile.am
> @@ -34,6 +34,7 @@ AM_CFLAGS = \
>         -I$(top_srcdir)/src/gallium/auxiliary \
>         $(LIBDRM_CFLAGS) \
>         $(DEFINES) \
> +       -DSYSCONFDIR=\"$(sysconfdir)\"
>         $(VISIBILITY_CFLAGS)
>
>  noinst_LTLIBRARIES = \
> diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
> index f17693e..b8ab480 100644
> --- a/src/mesa/drivers/dri/common/xmlconfig.c
> +++ b/src/mesa/drivers/dri/common/xmlconfig.c
> @@ -935,9 +935,13 @@ static void parseOneConfigFile (XML_Parser p) {
>  #undef BUF_SIZE
>  }
>
> +#ifndef SYSCONFDIR
> +#define SYSCONFDIR "/etc"
> +#endif
> +
>  void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
>                           int screenNum, const char *driverName) {
> -    char *filenames[2] = {"/etc/drirc", NULL};
> +    char *filenames[2] = { SYSCONFDIR "/drirc", NULL};
>      char *home;
>      uint32_t i;
>      struct OptConfData userData;
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list