diff --git a/xf86drmMode.c b/xf86drmMode.c index 2399e8ec..6fa2e83f 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -800,19 +800,11 @@ drm_public int drmCheckModesettingSupported(const char *busid) if (found) return 0; #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) - char kbusid[1024], sbusid[1024]; + char sbusid[1024]; char oid[128]; - int domain, bus, dev, func; int i, modesetting, ret; size_t len; - ret = sscanf(busid, "pci:%04x:%02x:%02x.%d", &domain, &bus, &dev, - &func); - if (ret != 4) - return -EINVAL; - snprintf(kbusid, sizeof(kbusid), "pci:%04x:%02x:%02x.%d", domain, bus, - dev, func); - /* How many GPUs do we expect in the machine ? */ for (i = 0; i < 16; i++) { snprintf(oid, sizeof(oid), "hw.dri.%d.busid", i); @@ -823,7 +815,7 @@ drm_public int drmCheckModesettingSupported(const char *busid) continue; return -EINVAL; } - if (strcmp(sbusid, kbusid) != 0) + if (strcmp(sbusid, busid) != 0) continue; snprintf(oid, sizeof(oid), "hw.dri.%d.modesetting", i); len = sizeof(modesetting);