diff options
| author | mrg <mrg@NetBSD.org> | 2016-09-24 23:12:54 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2016-09-24 23:12:54 +0000 |
| commit | a29b8a9254e05120010a7e055bfb92997ac80ad4 (patch) | |
| tree | 23bf76b075a6e025670fd3bf44ac7bc050fe91ca /usr.sbin/pcictl | |
| parent | 773e4c1d77e971afd052e261b6a501c84859d080 (diff) | |
introduce a better pci_drvname() and PCI_IOC_DRVNAME as pciio_drvnameonbus()
and PCI_IOC_DRVNAMEONBUS. the new ones also take a (autoconf) PCI bus
number, which allows lookups for any device on any pci bus node. use this
in pcictl which current reports the wrong values sometimes.
up next: use these in libpciaccess.
Diffstat (limited to 'usr.sbin/pcictl')
| -rw-r--r-- | usr.sbin/pcictl/pcictl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pcictl/pcictl.c b/usr.sbin/pcictl/pcictl.c index c94682a3b0c..f10a8bccae6 100644 --- a/usr.sbin/pcictl/pcictl.c +++ b/usr.sbin/pcictl/pcictl.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcictl.c,v 1.21 2014/09/01 07:11:19 manu Exp $ */ +/* $NetBSD: pcictl.c,v 1.22 2016/09/24 23:12:54 mrg Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -446,7 +446,8 @@ scan_pci_list(u_int bus, u_int dev, u_int func) } if (print_names) { char drvname[16]; - if (pci_drvname(pcifd, dev, func, drvname, sizeof drvname) == 0) + if (pci_drvnameonbus(pcifd, bus, dev, func, drvname, + sizeof drvname) == 0) printf(" [%s]", drvname); } printf("\n"); |
