diff options
author | Jon Smirl <[email protected]> | 2005-05-16 15:51:05 +0000 |
---|---|---|
committer | Jon Smirl <[email protected]> | 2005-05-16 15:51:05 +0000 |
commit | 3e8001a465ae67dbbbd1262115b71e7d4ef4c281 (patch) | |
tree | 90ae0e8a21069a1c674cb65ce87b79cc6293e29b /src | |
parent | af1a72997224610420b1105f967b0f5a8272858d (diff) |
Add error about write permission to fbdev attribs
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_egl.c | 7 |
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 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); |