Changeset View
Changeset View
Standalone View
Standalone View
graphics/libdrm/files/patch-xf86drm.h
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- xf86drm.h.orig 2017-03-21 18:18:28 UTC | |||||
+++ xf86drm.h | |||||
@@ -78,17 +78,27 @@ 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 | |||||
bapt: Why modifying openbsd stuff? | |||||
Done Inline ActionsConsolidation while refactoring the mess. I moved a bunch of utility functions up the .c file so they can be used where needed and moved #defines to the .h file. rezny: Consolidation while refactoring the mess. I moved a bunch of utility functions up the .c file… | |||||
Done Inline ActionsCorrection: DRM_{PRIMARY,CONTROL,RENDER}_MINOR_NAME were moved from the .c to the .h and DRM_{,CONTROL,RENDER}_DEV_NAME were redefined in terms of those. rezny: Correction: DRM_{PRIMARY,CONTROL,RENDER}_MINOR_NAME were moved from the .c to the .h and DRM_{… | |||||
#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 */ | |||||
+#define DRM_PRIMARY_MINOR_NAME "card" | |||||
+#define DRM_CONTROL_MINOR_NAME "controlD" | |||||
+#define DRM_RENDER_MINOR_NAME "renderD" | |||||
#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_NODE_NAME_MAX \ | |||||
+ (sizeof(DRM_DIR_NAME) + \ | |||||
+ MAX3(sizeof(DRM_PRIMARY_MINOR_NAME), \ | |||||
+ sizeof(DRM_CONTROL_MINOR_NAME), \ | |||||
+ sizeof(DRM_RENDER_MINOR_NAME)) \ | |||||
+ + 3) /* length of the node number */ | |||||
+ | |||||
#define DRM_ERR_NO_DEVICE (-1001) | |||||
#define DRM_ERR_NO_ACCESS (-1002) | |||||
#define DRM_ERR_NOT_ROOT (-1003) |
Why modifying openbsd stuff?