summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@gmail.com>2005-05-16 15:51:05 +0000
committerJon Smirl <jonsmirl@gmail.com>2005-05-16 15:51:05 +0000
commit3e8001a465ae67dbbbd1262115b71e7d4ef4c281 (patch)
tree90ae0e8a21069a1c674cb65ce87b79cc6293e29b /src/mesa/drivers/dri
parentaf1a72997224610420b1105f967b0f5a8272858d (diff)
Add error about write permission to fbdev attribs
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/fb/fb_egl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c
index e139e91552..78ca3a5860 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);