summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xf86drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xf86drm.c b/xf86drm.c
index b49d42f7..07a18c44 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -696,7 +696,7 @@ static int drmOpenByName(const char *name, int type)
int retcode;
sprintf(proc_name, "/proc/dri/%d/name", i);
- if ((fd = open(proc_name, 0, 0)) >= 0) {
+ if ((fd = open(proc_name, O_RDONLY, 0)) >= 0) {
retcode = read(fd, buf, sizeof(buf)-1);
close(fd);
if (retcode) {