aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gray2015-07-20 12:12:56 -0500
committerEmil Velikov2015-07-29 12:04:15 -0500
commitfc083322b0c8a58b51976adf23a582bce8bb75f1 (patch)
treea5b9deb7b0e4637df7441c5da6b884d5292ea9c4 /xf86drm.h
parent66c3afb75fa993f2f8b00c2dd9c2ec37a3a9dfb6 (diff)
downloadexternal-libdrm-fc083322b0c8a58b51976adf23a582bce8bb75f1.tar.gz
external-libdrm-fc083322b0c8a58b51976adf23a582bce8bb75f1.tar.xz
external-libdrm-fc083322b0c8a58b51976adf23a582bce8bb75f1.zip
xf86drm: use the correct device minor names on OpenBSD
Add defines for the device minor names and make use of them in drmGetMinorName() so the correct paths will be used on OpenBSD. v2: don't add new defines to xf86drm.h to keep them out of the API as requested by Emil. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r--xf86drm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xf86drm.h b/xf86drm.h
index 40c55c92..e3a19dc0 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -76,11 +76,18 @@ extern "C" {
76 (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) 76 (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
77#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) 77#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
78 78
79#ifdef __OpenBSD__
80#define DRM_DIR_NAME "/dev"
81#define DRM_DEV_NAME "%s/drm%d"
82#define DRM_CONTROL_DEV_NAME "%s/drmC%d"
83#define DRM_RENDER_DEV_NAME "%s/drmR%d"
84#else
79#define DRM_DIR_NAME "/dev/dri" 85#define DRM_DIR_NAME "/dev/dri"
80#define DRM_DEV_NAME "%s/card%d" 86#define DRM_DEV_NAME "%s/card%d"
81#define DRM_CONTROL_DEV_NAME "%s/controlD%d" 87#define DRM_CONTROL_DEV_NAME "%s/controlD%d"
82#define DRM_RENDER_DEV_NAME "%s/renderD%d" 88#define DRM_RENDER_DEV_NAME "%s/renderD%d"
83#define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */ 89#define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */
90#endif
84 91
85#define DRM_ERR_NO_DEVICE (-1001) 92#define DRM_ERR_NO_DEVICE (-1001)
86#define DRM_ERR_NO_ACCESS (-1002) 93#define DRM_ERR_NO_ACCESS (-1002)