[Mesa-dev] [PATCH] gbm: Replace GBM_DRIVERS_PATH with LIBGL_DRIVERS_PATH
Dylan Baker
baker.dylan.c at gmail.com
Mon Jul 21 20:32:19 PDT 2014
On Friday, July 18, 2014 07:41:57 AM Dylan Baker wrote:
> Currently mesa searches for two different environment variables,
> LIBGL_DRIVERS_PATH and GBM_DRIVERS_PATH. The first is used for search
> for DRI drivers in every case except GBM, and the latter is used
> exclusively for setting GBM drivers. This patch simplifies things by
> having just one variable to set.
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> src/gbm/backends/dri/gbm_dri.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index 347bc99..9d9d1c4 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -212,8 +212,8 @@ dri_load_driver(struct gbm_dri_device *dri)
>
> search_paths = NULL;
> if (geteuid() == getuid()) {
> - /* don't allow setuid apps to use GBM_DRIVERS_PATH */
> - search_paths = getenv("GBM_DRIVERS_PATH");
> + /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
> + search_paths = getenv("LIBGL_DRIVERS_PATH");
> }
> if (search_paths == NULL)
> search_paths = DEFAULT_DRIVER_DIR;
It might not be worth much, but I thought I would point out that none of the
documentation mentions GBM_DRIVERS_PATH at all, `grep GBM_DRIVERS_PATH * -r`
only shows the two instances, the actual reading of the variable and the
comment describing it.
That said, I think Kristian's plan is the right one, I'll send an updated
patch later.
- Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140721/0c66756a/attachment.sig>
More information about the mesa-dev
mailing list