From owner-svn-src-stable@freebsd.org Sun Sep 13 07:15:46 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6B01A0115C; Sun, 13 Sep 2015 07:15:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7801F48; Sun, 13 Sep 2015 07:15:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D7FkT4098898; Sun, 13 Sep 2015 07:15:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D7Fjgw098894; Sun, 13 Sep 2015 07:15:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201509130715.t8D7Fjgw098894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 13 Sep 2015 07:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287746 - stable/10/usr.sbin/pciconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 07:15:46 -0000 Author: bapt Date: Sun Sep 13 07:15:45 2015 New Revision: 287746 URL: https://svnweb.freebsd.org/changeset/base/287746 Log: 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 Modified: stable/10/usr.sbin/pciconf/pathnames.h stable/10/usr.sbin/pciconf/pciconf.8 stable/10/usr.sbin/pciconf/pciconf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pciconf/pathnames.h ============================================================================== --- stable/10/usr.sbin/pciconf/pathnames.h Sun Sep 13 07:15:14 2015 (r287745) +++ stable/10/usr.sbin/pciconf/pathnames.h Sun Sep 13 07:15:45 2015 (r287746) @@ -1,3 +1,4 @@ /* $FreeBSD$ */ #define _PATH_DEVPCI "/dev/pci" #define _PATH_PCIVDB "/usr/share/misc/pci_vendors" +#define _PATH_LPCIVDB "/usr/local/share/pciids/pci.ids" Modified: stable/10/usr.sbin/pciconf/pciconf.8 ============================================================================== --- stable/10/usr.sbin/pciconf/pciconf.8 Sun Sep 13 07:15:14 2015 (r287745) +++ stable/10/usr.sbin/pciconf/pciconf.8 Sun Sep 13 07:15:45 2015 (r287746) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2014 +.Dd September 06, 2015 .Dt PCICONF 8 .Os .Sh NAME @@ -281,7 +281,9 @@ indicates a halfword (two-byte) operatio The default is to read or write a longword (four bytes). .Sh ENVIRONMENT -The PCI vendor/device information database is normally read from +PCI vendor and device information is read from +.Pa /usr/local/share/pciids/pci.ids . +If that file is not present, it is read from .Pa /usr/share/misc/pci_vendors . This path can be overridden by setting the environment variable .Ev PCICONF_VENDOR_DATABASE . Modified: stable/10/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/10/usr.sbin/pciconf/pciconf.c Sun Sep 13 07:15:14 2015 (r287745) +++ stable/10/usr.sbin/pciconf/pciconf.c Sun Sep 13 07:15:45 2015 (r287746) @@ -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;