Page MenuHomeFreeBSD

pciconf: Add -C option to filter by class name
Needs ReviewPublic

Authored by code_fedang.net on Fri, Sep 11, 10:16 PM.
Tags
None
Referenced Files
F172589286: D59602.id186494.diff
Sat, Sep 19, 12:24 PM
Unknown Object (File)
Sat, Sep 19, 3:21 AM
Unknown Object (File)
Sat, Sep 19, 1:00 AM
Unknown Object (File)
Sat, Sep 19, 12:29 AM
Unknown Object (File)
Fri, Sep 18, 8:51 PM
Unknown Object (File)
Fri, Sep 18, 3:40 AM
Unknown Object (File)
Thu, Sep 17, 6:52 PM
Unknown Object (File)
Thu, Sep 17, 10:40 AM
Subscribers

Details

Reviewers
bnovkov

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