- int bus = pci_bdf_to_bus(bdf);
- if (bus)
- // XXX - this isn't the correct path syntax
- p += snprintf(p, max, "/bus%x", bus);
+ if (pci->parent) {
+ p = build_pci_path(p, max, "pci-bridge", pci->parent);
+ } else {
+ if (pci->rootbus)
+ p += snprintf(p, max, "/pci-root@%x", pci->rootbus);
+ p += snprintf(p, buf+max-p, "%s", FW_PCI_DOMAIN);
+ }