From 1aa800d4644cd2ac8ab7683ffe8a1265108fcc7f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 8 Feb 2024 12:07:55 -0800 Subject: Revert "xf86drm: ignore symlinks in process_device()" This reverts commit 7ab1cdac9013d2a4c41b3d0975f953585517cfa1. This breaks numerous tools that rely on being able to read symlinks, and constitutes a regression. Signed-off-by: Dylan Baker Tested-by: Mark Janes Tested-by: Tobias Jakobi Closes: #103 --- xf86drm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index 150c6095..2e76f0ea 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4479,10 +4479,7 @@ process_device(drmDevicePtr *device, const char *d_name, return -1; snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, d_name); - if (lstat(node, &sbuf)) - return -1; - - if (S_ISLNK(sbuf.st_mode)) + if (stat(node, &sbuf)) return -1; maj = major(sbuf.st_rdev); -- cgit v1.2.3