Hi, just an idea - as '-c' is already taken for 'capabilities' it would be handy to have '-C' option to filter the devices only to needed class/subclass. For example now to display 'network' related devices this 'quirk' is needed: # pciconf -l -v | grep -B 3 -E 'class.*network' em0@pci0:0:31:6: class=0x020000 rev=0x21 hdr=0x00 vendor=0x8086 device=0x15d8 subvendor=0x17aa subdevice=0x225d vendor = 'Intel Corporation' device = 'Ethernet Connection (4) I219-V' class = network -- iwlwifi0@pci0:3:0:0: class=0x028000 rev=0x29 hdr=0x00 vendor=0x8086 device=0x2526 subvendor=0x8086 subdevice=0x0014 vendor = 'Intel Corporation' device = 'Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak]' class = network It would be a lot better with '-C' and would look something like that: # pciconf -l -c network em0@pci0:0:31:6: class=0x020000 rev=0x21 hdr=0x00 vendor=0x8086 device=0x15d8 iwlwifi0@pci0:3:0:0: class=0x028000 rev=0x29 hdr=0x00 vendor=0x8086 device=0x2526 # pciconf -l -v -c network em0@pci0:0:31:6: class=0x020000 rev=0x21 hdr=0x00 vendor=0x8086 device=0x15d8 subvendor=0x17aa subdevice=0x225d vendor = 'Intel Corporation' device = 'Ethernet Connection (4) I219-V' class = network iwlwifi0@pci0:3:0:0: class=0x028000 rev=0x29 hdr=0x00 vendor=0x8086 device=0x2526 subvendor=0x8086 subdevice=0x0014 vendor = 'Intel Corporation' device = 'Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak]' class = network Regards, vermaden
Do you think its useful?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=46d383af0dbdb3871354f344b9c1ba99da691121 commit 46d383af0dbdb3871354f344b9c1ba99da691121 Author: Federico Angelilli <code@fedang.net> AuthorDate: 2026-09-21 18:23:10 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2026-09-21 18:37:59 +0000 pciconf: Add -C option to filter by class name Differential Revision: https://reviews.freebsd.org/D59602 MFC after: 3 weeks PR: 289923 Reviewed by: bnovkov usr.sbin/pciconf/pciconf.8 | 10 ++++++++-- usr.sbin/pciconf/pciconf.c | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 7 deletions(-)