From 3e8001a465ae67dbbbd1262115b71e7d4ef4c281 Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Mon, 16 May 2005 15:51:05 +0000 Subject: [PATCH] Add error about write permission to fbdev attribs --- src/mesa/drivers/dri/fb/fb_egl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c index e139e915524..78ca3a58604 100644 --- a/src/mesa/drivers/dri/fb/fb_egl.c +++ b/src/mesa/drivers/dri/fb/fb_egl.c @@ -744,12 +744,19 @@ fbShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, snprintf(buffer, sizeof(buffer), "%s/%s/mode", sysfs, scrn->fb); file = fopen(buffer, "r+"); + if (!file) { +err: + printf("chown all fb sysfs attrib to allow write - %s\n", buffer); + return EGL_FALSE; + } fputs(mode->Name, file); fclose(file); snprintf(buffer, sizeof(buffer), "%s/%s/bits_per_pixel", sysfs, scrn->fb); file = fopen(buffer, "r+"); + if (!file) + goto err; snprintf(buffer, sizeof(buffer), "%d", surf->Base.Config->glmode.rgbBits); fputs(buffer, file); fclose(file); -- 2.30.2