diff options
author | Daryll Strauss <daryll@users.sourceforge.net> | 1999-12-18 18:34:59 +0000 |
---|---|---|
committer | Daryll Strauss <daryll@users.sourceforge.net> | 1999-12-18 18:34:59 +0000 |
commit | 0371c290a12f75d36c9c1e7c947bf98fe210908b (patch) | |
tree | 704f59c73c4ba9349da29109426ac3a8102e2600 /libdrm | |
parent | 46e1467a83415f3859ac15b8aa8dfb829c85d1d4 (diff) |
Rename the device to be /dev/dri instead of /dev/dri to avoid a conflict.dispatch-0-0-1-20000128dispatch-0-0-1-branch
Rename proc entry from /proc/graphics to /proc/dri to be consistent.
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 0d3b90a86..542356e10 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -148,7 +148,7 @@ static int drm_open(const char *file) int drmAvailable(void) { - if (!access("/proc/graphics/0", R_OK)) return 1; + if (!access("/proc/dri/0", R_OK)) return 1; return 0; } @@ -182,7 +182,7 @@ static int drmOpenByBusid(const char *busid) int fd; for (i = 0; i < 8; i++) { - sprintf(dev_name, "/dev/graphics/card%d", i); + sprintf(dev_name, "/dev/dri/card%d", i); if ((fd = drm_open(dev_name)) >= 0) { buf = drmGetBusid(fd); if (buf && !strcmp(buf, busid)) { @@ -224,14 +224,14 @@ static int drmOpenByName(const char *name) if (dirmode & S_IRGRP) dirmode |= S_IXGRP; if (dirmode & S_IROTH) dirmode |= S_IXOTH; dirmode &= ~(S_IWGRP | S_IWOTH); - mkdir("/dev/graphics", 0); - chown("/dev/graphics", user, group); - chmod("/dev/graphics", dirmode); + mkdir("/dev/dri", 0); + chown("/dev/dri", user, group); + chmod("/dev/dri", dirmode); } for (i = 0; i < 8; i++) { - sprintf(proc_name, "/proc/graphics/%d/name", i); - sprintf(dev_name, "/dev/graphics/card%d", i); + sprintf(proc_name, "/proc/dri/%d/name", i); + sprintf(dev_name, "/dev/dri/card%d", i); if ((fd = open(proc_name, 0, 0)) >= 0) { retcode = read(fd, buf, sizeof(buf)-1); close(fd); @@ -260,7 +260,7 @@ static int drmOpenByName(const char *name) } /* drmOpen looks up the specified name and busid, and opens the device - found. The entry in /dev/graphics is created if necessary (and if root). + found. The entry in /dev/dri is created if necessary (and if root). A file descriptor is returned. On error, the return value is negative. */ |