summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-02-08 12:07:55 -0800
committerDylan Baker <dylan@pnwbakers.com>2024-02-12 12:03:17 -0800
commit1aa800d4644cd2ac8ab7683ffe8a1265108fcc7f (patch)
treee99f25f9ba35478b6a1b96e38be89afc6b8009dd
parent7ab1cdac9013d2a4c41b3d0975f953585517cfa1 (diff)
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 <dylan.c.baker@intel.com> Tested-by: Mark Janes <markjanes@swizzler.org> Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Closes: #103
-rw-r--r--xf86drm.c5
1 files changed, 1 insertions, 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);