Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714 Signed-off-by: Tj Reviewed-by: Thomas Zimmermann Reviewed-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/fbdevhw/fbdevhw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 1e39c81469..92cac3f4af 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -378,9 +378,9 @@ fbdev_open(int scrnIndex, const char *dev, char **namep) node++; } - if (asprintf(&sysfs_path, "/sys/class/graphics/%s", node) < 0 || + if (asprintf(&sysfs_path, "/sys/class/graphics/%s/device/subsystem", node) < 0 || readlink(sysfs_path, buf, sizeof(buf) - 1) < 0 || - strstr(buf, "devices/pci")) { + strstr(buf, "bus/pci")) { free(sysfs_path); close(fd); return -1; -- GitLab