Page MenuHomeFreeBSD

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

Authored by imp on Sat, Jun 27, 1:28 PM.
Tags
None
Referenced Files
F162173147: D57902.id.diff
Fri, Jul 10, 1:57 PM
Unknown Object (File)
Thu, Jul 9, 11:26 AM
Unknown Object (File)
Tue, Jul 7, 12:04 AM
Unknown Object (File)
Mon, Jul 6, 12:12 AM
Unknown Object (File)
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
Subscribers

Details

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 Not Applicable
Unit
Tests Not Applicable

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))
This revision was not accepted when it landed; it landed in state Needs Review.Fri, Jul 10, 4:19 AM
This revision was automatically updated to reflect the committed changes.