summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf/pciconf.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-09-13 07:15:45 +0000
committerbapt <bapt@FreeBSD.org>2015-09-13 07:15:45 +0000
commit44b5ad695538d1ce6a4e50da128435775460329a (patch)
treeae07535d260f4f1c03844adfe4ed12523c82fb4d /usr.sbin/pciconf/pciconf.c
parent312f8936e8f9983804df0fefddc4a55202c721ab (diff)
downloadFreeBSD-src-44b5ad695538d1ce6a4e50da128435775460329a.zip
FreeBSD-src-44b5ad695538d1ce6a4e50da128435775460329a.tar.gz
MFC: r287522
Prefer pciids database from ports if present Given the pciids database on ports is updated more often than the one in base prefer this version if present, otherwise read the one from base. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3391
Diffstat (limited to 'usr.sbin/pciconf/pciconf.c')
-rw-r--r--usr.sbin/pciconf/pciconf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index 22bb61d..ad709db 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -542,9 +542,12 @@ load_vendors(void)
*/
TAILQ_INIT(&pci_vendors);
if ((dbf = getenv("PCICONF_VENDOR_DATABASE")) == NULL)
+ dbf = _PATH_LPCIVDB;
+ if ((db = fopen(dbf, "r")) == NULL) {
dbf = _PATH_PCIVDB;
- if ((db = fopen(dbf, "r")) == NULL)
- return(1);
+ if ((db = fopen(dbf, "r")) == NULL)
+ return(1);
+ }
cv = NULL;
cd = NULL;
error = 0;
OpenPOWER on IntegriCloud