* There is no way to check if a device name is really a drm device
  by looking it up in a virtual filesystem like on Linux

* The major device number is also dynamically allocated from a pool,
  comparing it to a constant makes no sense

* In the absence of better ideas, just assume the device name really
  points to a drm device and always return true

Signed-off-by: François Tigeot <[email protected]>
---
 xf86drm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xf86drm.c b/xf86drm.c
index 71ad54ba..0085bf17 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2778,6 +2778,8 @@ static bool drmNodeIsDRM(int maj, int min)
     snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
              maj, min);
     return stat(path, &sbuf) == 0;
+#elif __DragonFly__
+    return true;       /* DragonFly BSD has no fixed major device numbers */
 #else
     return maj == DRM_MAJOR;
 #endif
-- 
2.19.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to