diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2015-07-21 03:12:56 +1000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-07-29 18:04:15 +0100 |
commit | fc083322b0c8a58b51976adf23a582bce8bb75f1 (patch) | |
tree | a5b9deb7b0e4637df7441c5da6b884d5292ea9c4 /xf86drm.h | |
parent | 66c3afb75fa993f2f8b00c2dd9c2ec37a3a9dfb6 (diff) |
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.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -76,11 +76,18 @@ extern "C" { (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) +#ifdef __OpenBSD__ +#define DRM_DIR_NAME "/dev" +#define DRM_DEV_NAME "%s/drm%d" +#define DRM_CONTROL_DEV_NAME "%s/drmC%d" +#define DRM_RENDER_DEV_NAME "%s/drmR%d" +#else #define DRM_DIR_NAME "/dev/dri" #define DRM_DEV_NAME "%s/card%d" #define DRM_CONTROL_DEV_NAME "%s/controlD%d" #define DRM_RENDER_DEV_NAME "%s/renderD%d" #define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */ +#endif #define DRM_ERR_NO_DEVICE (-1001) #define DRM_ERR_NO_ACCESS (-1002) |