Look for the PCI ROM file elsewhere in sysfs.

/sys/devices reflects the bus topology, and we don't care that much.
Easier (and more reliable) to just look in /sys/bus/pci/devices, which
is a flat view.
This commit is contained in:
Adam Jackson 2007-04-09 19:08:52 -04:00
parent a08d5157f7
commit 67e1c98895

View File

@ -773,8 +773,8 @@ xf86ReadDomainMemory(PCITAG Tag, ADDRESS Base, int Len, unsigned char *Buf)
bus = PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(Tag));
dev = PCI_DEV_FROM_TAG(Tag);
func = PCI_FUNC_FROM_TAG(Tag);
sprintf(file, "/sys/devices/pci%04x:%02x/%04x:%02x:%02x.%1x/rom",
dom, bus, dom, bus, dev, func);
sprintf(file, "/sys/bus/pci/devices/%04x:%02x:%02x.%1x/rom",
dom, bus, dev, func);
/*
* If the caller wants the ROM and the sysfs rom interface exists,