From owner-freebsd-bugs Sun Feb 28 12: 0:31 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 62261152A8 for ; Sun, 28 Feb 1999 12:00:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id MAA34169; Sun, 28 Feb 1999 12:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from geo.geocast.net (geo.geocast.net [128.177.240.120]) by hub.freebsd.org (Postfix) with ESMTP id 0206C15272 for ; Sun, 28 Feb 1999 11:56:24 -0800 (PST) (envelope-from castor@geocast.net) Received: from localhost (castor@localhost) by geo.geocast.net (8.8.8/8.8.8) with ESMTP id LAA18890 for ; Sun, 28 Feb 1999 11:56:32 -0800 (PST) Message-Id: Date: Sun, 28 Feb 1999 11:56:32 -0800 (PST) From: Castor Fu To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10312: pciconf -l generates output incompatible with pciconf -r Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10312 >Category: bin >Synopsis: pciconf -l generates output incompatible with pciconf -r >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 28 12:00:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Castor Fu >Release: FreeBSD 3.1-RELEASE i386 >Organization: Geocast Network Systems >Environment: FreeBSD 3.1-RELEASE but the problem has been verified to occur with the pciconf which is in RELENG_3 tag. >Description: The change in the format of 'pciconf -l' to identify the device associated with each card produces output where the first column of output can no longer be used as a selector for 'pciconf -[rwa] '. This contradicts the manual page and may cause various scripts to fail. >How-To-Repeat: clf-0# pciconf -l chip0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x71008086 rev=0x01 hdr=0x00 chip1@pci0:1:0: class=0x060100 card=0x00000000 chip=0x71108086 rev=0x01 hdr=0x00 ide_pci0@pci0:1:1: class=0x010180 card=0x00000000 chip=0x71118086 rev=0x01 hdr=0x00 uhci0@pci0:1:2: class=0x0c0300 card=0x00000000 chip=0x71128086 rev=0x01 hdr=0x00 chip2@pci0:1:3: class=0x068000 card=0x00000000 chip=0x71138086 rev=0x01 hdr=0x00 vga0@pci0:9:0: class=0x030000 card=0x8a015333 chip=0x8a015333 rev=0x01 hdr=0x00 bktr0@pci0:10:0: class=0x040000 card=0x00000000 chip=0x0350109e rev=0x12 hdr=0x00 de0@pci0:11:0: class=0x020000 card=0x11001385 chip=0x00091011 rev=0x22 hdr=0x00 clf-0# pciconf -r de0@pci0:11:0: 12 pciconf: cannot parse selector de0@pci0:11:0: >Fix: Index: pciconf.c =================================================================== RCS file: /cvs/src/usr.sbin/pciconf/pciconf.c,v retrieving revision 1.7 diff -r1.7 pciconf.c 193c193,194 < char *ep = (char*) str; --- > char *ep = strchr(str, '@'); > char *epbase; 195c196,203 < --- > > if (ep == 0) { > ep = (char *) str; > } else { > ep++; > } > epbase = ep; > 207a216,217 > if (*ep == ':') > ep++; 209,211c219 < if (*ep == ':') < ep++; < if (*ep || ep == str) --- > if (*ep || ep == epbase) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message