From c366b82bd50066019cf82b3464445d5bc27d6f9f Mon Sep 17 00:00:00 2001 From: Jay Estabrook Date: Fri, 9 Mar 2007 12:26:55 +0000 Subject: [PATCH] Ensure domain is stripped from the bus ID. --- hw/xfree86/dri/dri.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index c183e2a1f..7bd07c003 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -71,6 +71,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mipointer.h" #include "xf86_OSproc.h" +#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) + #if !defined(PANORAMIX) extern Bool noPanoramiXExtension; #endif @@ -2202,8 +2204,8 @@ DRICreatePCIBusID(pciVideoPtr PciInfo) tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func); domain = xf86GetPciDomain(tag); - snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, PciInfo->bus, - PciInfo->device, PciInfo->func); + snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, + PCI_BUS_NO_DOMAIN(PciInfo->bus), PciInfo->device, PciInfo->func); return busID; }