diff options
author | Eric Engestrom <eric.engestrom@intel.com> | 2018-12-19 13:02:13 +0000 |
---|---|---|
committer | Eric Engestrom <eric.engestrom@intel.com> | 2019-07-03 13:06:21 +0100 |
commit | 0d5ea0773652e5d5fcd4a578f8b3d3303a40b6a1 (patch) | |
tree | 12f03c3d4463a58fd0a2c64846dd9c8fafcf7806 /xf86drm.h | |
parent | 293b95e81531dbfc1327cbaae125cc13e7fb074d (diff) | |
download | libdrm-0d5ea0773652e5d5fcd4a578f8b3d3303a40b6a1.tar.gz libdrm-0d5ea0773652e5d5fcd4a578f8b3d3303a40b6a1.tar.bz2 libdrm-0d5ea0773652e5d5fcd4a578f8b3d3303a40b6a1.zip |
xf86drm: dedupe `#define`s
Adapted from a local patch carried by DragonFlyBSD:
https://github.com/DragonFlyBSD/DPorts/blob/bc056f88f7e4d468d8c9751f831a47b5ae1326e3/graphics/libdrm/files/patch-xf86drm.h
Patch is sadly uncredited (a bot authored the commit), so I can't credit
the author here either.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r-- | xf86drm.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -78,17 +78,21 @@ extern "C" { #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" +#define DRM_PRIMARY_MINOR_NAME "drm" +#define DRM_CONTROL_MINOR_NAME "drmC" +#define DRM_RENDER_MINOR_NAME "drmR" #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_PRIMARY_MINOR_NAME "card" +#define DRM_CONTROL_MINOR_NAME "controlD" +#define DRM_RENDER_MINOR_NAME "renderD" #define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */ #endif +#define DRM_DEV_NAME "%s/" DRM_PRIMARY_MINOR_NAME "%d" +#define DRM_CONTROL_DEV_NAME "%s/" DRM_CONTROL_MINOR_NAME "%d" +#define DRM_RENDER_DEV_NAME "%s/" DRM_RENDER_MINOR_NAME "%d" + #define DRM_ERR_NO_DEVICE (-1001) #define DRM_ERR_NO_ACCESS (-1002) #define DRM_ERR_NOT_ROOT (-1003) |