display version number of each kld module when using

the -v flag.
This commit is contained in:
Jonathan M. Bresler 2000-06-20 19:04:22 +00:00
parent 6ebb8ebbd1
commit 28b406b210
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61881
2 changed files with 5 additions and 5 deletions

View File

@ -39,13 +39,12 @@
.Sh DESCRIPTION
The
.Nm
utility displays the status of any files dynamically linked into the
kernel.
utility displays information about files dynamically linked into the kernel.
.Pp
The following options are available:
.Bl -tag -width indentXX
.It Fl v
Be more verbose.
Display information about each module in each file.
.It Fl i Ar id
Display the status of only the file with this ID.
.It Fl n Ar name

View File

@ -53,7 +53,8 @@ printmod(int modid)
if (modstat(modid, &stat) < 0)
warn("can't stat module id %d", modid);
else
printf("\t\t%2d %s\n", stat.id, stat.name);
printf("\t\t%2d %2d 0x%-8x %s\n",
stat.id, stat.refs, stat.version, stat.name);
}
static void printfile(int fileid, int verbose)
@ -70,7 +71,7 @@ static void printfile(int fileid, int verbose)
if (verbose) {
printf("\tContains modules:\n");
printf("\t\tId Name\n");
printf("\t\tId Refs Version%*c Name\n", POINTER_WIDTH - 7, ' ');
for (modid = kldfirstmod(fileid); modid > 0;
modid = modfnext(modid))
printmod(modid);