[PATCH libdrm] libdrm: Fix drmNodeIsDRM() on DragonFly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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 <ftigeot@xxxxxxxxxxxx>
---
 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
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux