diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 1e39c8146..92cac3f4a 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;