Page MenuHomeFreeBSD

kldxref: Add -m filag to print info about modules in one file
Needs ReviewPublic

Authored by imp on Sat, Jun 27, 1:28 PM.
Tags
None
Referenced Files
F161692662: D57902.id180812.diff
Mon, Jul 6, 12:12 AM
F161660292: D57902.id180812.diff
Sun, Jul 5, 5:15 PM
Unknown Object (File)
Sat, Jul 4, 6:42 AM
Unknown Object (File)
Sat, Jul 4, 6:39 AM
Unknown Object (File)
Sat, Jul 4, 5:31 AM
Unknown Object (File)
Thu, Jul 2, 10:07 AM
Unknown Object (File)
Thu, Jul 2, 10:07 AM
Unknown Object (File)
Thu, Jul 2, 10:07 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

kldxref -m <file> will print the same data that the '-d' flag produces,
except restrict the output to one file. This should be the full path to
the file, and the directory name to process is omitted.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Sat, Jun 27, 1:28 PM
jrtc27 added inline comments.
usr.sbin/kldxref/kldxref.c
796

Isn't < 0 impossible, as that would imply getopt ran off the end of argv? And don't you want to check that no extra arguments were passed for -m, given we skip the fts_open(argv)? That is:

if ((module != NULL && argc - optind > 0) || (module == NULL && argc - optind < 1))

or, if you want to be sneaky:

if ((module == NULL) == (argc - optind < 1))