From owner-svn-src-head@FreeBSD.ORG Tue Jan 21 19:03:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91DA345C; Tue, 21 Jan 2014 19:03:15 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64ACF1E0E; Tue, 21 Jan 2014 19:03:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4BAD2B945; Tue, 21 Jan 2014 14:03:13 -0500 (EST) From: John Baldwin To: Ruslan Makhmatkhanov Subject: Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf Date: Tue, 21 Jan 2014 13:19:01 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201401202056.s0KKuAbH069433@svn.freebsd.org> <201401211100.25712.jhb@freebsd.org> <52DEB336.1040306@yandex.ru> In-Reply-To: <52DEB336.1040306@yandex.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401211319.02050.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 21 Jan 2014 14:03:13 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2014 19:03:15 -0000 On Tuesday, January 21, 2014 12:49:42 pm Ruslan Makhmatkhanov wrote: > John Baldwin wrote on 21.01.2014 20:00: > > On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: > >> Author: jhb > >> Date: Mon Jan 20 20:56:09 2014 > >> New Revision: 260926 > >> URL: http://svnweb.freebsd.org/changeset/base/260926 > >> > >> Log: > >> Add support for displaying VPD for PCI devices via pciconf. > >> - Store the length of each read-only VPD value since not all values are > >> guaranteed to be ASCII values (though most are). > >> - Add a new pciio ioctl to fetch VPD for a single PCI device. The values > >> are returned as a list of variable length records, one for the device > >> name and each keyword. > >> - Add a new -V flag to pciconf's list mode which displays VPD data for > >> each device. > >> > >> MFC after: 1 week > > > > Sample output: > > > > t4nex0@pci0:4:0:4: class=0x020000 card=0x00001425 chip=0x44011425 > > rev=0x00 hdr=0x00 > > VPD ident = 'T420-LL-CR ' > > VPD ro PN = '110114640C0 ' > > VPD ro EC = '01234567890123 ' > > VPD ro SN = 'PT06120042 ' > > VPD ro NA = '000743123340' > > VPD ro V0 = '0909FFFF' > > VPD ro V1 = '48000810180109111948484848484847' > > ... > > That's great. So why not to strip whitespace in the output? I suppose it could trim trailing whitespace. The format of these fields is very loose (just ASCII), so I wanted to display the raw value in case there were cases where it might be significant. -- John Baldwin