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
F175129476: D59602.id.diff
Thu, Oct 8, 12:13 PM
F175084997: D59602.id186782.diff
Thu, Oct 8, 3:59 AM
Unknown Object (File)
Fri, Oct 2, 7:03 PM
Unknown Object (File)
Fri, Oct 2, 6:54 PM
Unknown Object (File)
Fri, Oct 2, 5:15 PM
Unknown Object (File)
Fri, Oct 2, 4:37 PM
Unknown Object (File)
Thu, Oct 1, 7:32 AM
Unknown Object (File)
Tue, Sep 29, 9:40 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.