Page MenuHomeFreeBSD

pciconf: Add -C option to filter by class name
ClosedPublic

Authored by code_fedang.net on Sep 11 2026, 10:16 PM.
Tags
None
Referenced Files
F175755720: D59602.diff
Tue, Oct 13, 2:09 AM
F175682679: D59602.diff
Mon, Oct 12, 12:18 PM
Unknown Object (File)
Mon, Oct 12, 2:58 AM
Unknown Object (File)
Fri, Oct 9, 6:11 PM
Unknown Object (File)
Fri, Oct 9, 6:16 AM
Unknown Object (File)
Fri, Oct 9, 5:52 AM
Unknown Object (File)
Fri, Oct 9, 5:40 AM
Unknown Object (File)
Thu, Oct 8, 12:13 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76785
Build 73668: arc lint + arc unit

Event Timeline

Use strcasecmp instead of strcmp to check class name.

usr.sbin/pciconf/pciconf.8
26

Please bump the date.

usr.sbin/pciconf/pciconf.c
1094

This function should ideally return a bool.

1097
1100

Please turn this into an explicit == 0 check

1101–1104
usr.sbin/pciconf/pciconf.c
335

Passing -l without a class string will crash the program since there's no class != NULL check here or in validate_class.

I suggest adding a NULL check in validate_class.

code_fedang.net added inline comments.
usr.sbin/pciconf/pciconf.c
335

oops, that slipped through

This revision was not accepted when it landed; it landed in state Needs Review.Mon, Sep 21, 6:39 PM
This revision was automatically updated to reflect the committed changes.