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
F175295234: D59602.id187352.diff
Fri, Oct 9, 6:11 PM
F175225975: D59602.id186493.diff
Fri, Oct 9, 6:16 AM
F175223718: D59602.id187182.diff
Fri, Oct 9, 5:52 AM
F175222745: D59602.id186494.diff
Fri, Oct 9, 5:40 AM
Unknown Object (File)
Thu, Oct 8, 12:13 PM
Unknown Object (File)
Thu, Oct 8, 3:59 AM
Unknown Object (File)
Fri, Oct 2, 7:03 PM
Unknown Object (File)
Fri, Oct 2, 6:54 PM
Subscribers

Diff Detail

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