Revert "xf86drm: ignore symlinks in process_device()"

This reverts commit 7ab1cdac90.

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
main
Dylan Baker 2024-02-08 12:07:55 -08:00
parent 7ab1cdac90
commit 1aa800d464
1 changed files with 1 additions and 4 deletions

View File

@ -4479,10 +4479,7 @@ process_device(drmDevicePtr *device, const char *d_name,
return -1; return -1;
snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, d_name); snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, d_name);
if (lstat(node, &sbuf)) if (stat(node, &sbuf))
return -1;
if (S_ISLNK(sbuf.st_mode))
return -1; return -1;
maj = major(sbuf.st_rdev); maj = major(sbuf.st_rdev);