From: Martin Mares Date: Sun, 17 Feb 2008 22:28:52 +0000 (+0100) Subject: Example: Print device address including domain. X-Git-Tag: v3.0.0~1^2~11 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8d2739f86ae889ae01960e92d9321f6e979f5906;p=pciutils.git Example: Print device address including domain. --- diff --git a/example.c b/example.c index 66cfa78..1e3509f 100644 --- a/example.c +++ b/example.c @@ -23,8 +23,8 @@ int main(void) { pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); /* Fill in header info we need */ c = pci_read_byte(dev, PCI_INTERRUPT_PIN); /* Read config register directly */ - printf("%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d (pin %d) base0=%lx\n", - dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id, + printf("%04x:%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d (pin %d) base0=%lx\n", + dev->domain, dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id, dev->device_class, dev->irq, c, (long) dev->base_addr[0]); } pci_cleanup(pacc); /* Close everything */