Page MenuHomeFreeBSD

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

Authored by code_fedang.net on Fri, Sep 11, 10:16 PM.
Tags
None
Referenced Files
F173256455: D59602.id186782.diff
Thu, Sep 24, 6:21 PM
F173229270: D59602.id186782.diff
Thu, Sep 24, 12:20 PM
F173210963: D59602.id186494.diff
Thu, Sep 24, 8:11 AM
F173197902: D59602.id187352.diff
Thu, Sep 24, 6:07 AM
F173195871: D59602.diff
Thu, Sep 24, 5:49 AM
F173192559: D59602.id186493.diff
Thu, Sep 24, 5:11 AM
F173152326: D59602.id187182.diff
Wed, Sep 23, 11:25 PM
Unknown Object (File)
Wed, Sep 23, 3:48 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77072
Build 73955: 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.