NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/47951: modstat(8) can't display load address
The following reply was made to PR bin/47951; it has been noted by GNATS.
From: riz%NetBSD.org@localhost
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/47951: modstat(8) can't display load address
Date: Fri, 21 Jun 2013 12:15:13 -0700
OK, I cooked up a patch that is untested on anything except amd64
at this point.
Index: main.c
===================================================================
RCS file: /cvsroot/src/sbin/modstat/main.c,v
retrieving revision 1.15
diff -u -r1.15 main.c
--- main.c 7 Aug 2012 01:19:05 -0000 1.15
+++ main.c 21 Jun 2013 19:13:25 -0000
@@ -175,9 +175,9 @@
if (maxnamelen < namelen)
maxnamelen = namelen;
}
- printf("%-*s %-10s %-10s %-5s %-8s %s\n",
- (int)maxnamelen, "NAME", "CLASS", "SOURCE", "REFS", "SIZE",
- "REQUIRES");
+ printf("%-*s %-10s %-10s %-5s %-16s %-8s %s \n",
+ (int)maxnamelen, "NAME", "CLASS", "SOURCE", "REFS", "ADDRESS",
+ "SIZE", "REQUIRES");
for (ms = iov.iov_base; len != 0; ms++, len--) {
const char *class;
const char *source;
@@ -204,9 +204,9 @@
else
source = "UNKNOWN";
- printf("%-*s %-10s %-10s %-5d %-8s %s\n",
+ printf("%-*s %-10s %-10s %-5d %-16" PRIx64 " %-8s %s\n",
(int)maxnamelen, ms->ms_name, class, source, ms->ms_refcnt,
- sbuf, ms->ms_required);
+ ms->ms_addr, sbuf, ms->ms_required);
}
exit(EXIT_SUCCESS);
Index: modstat.8
===================================================================
RCS file: /cvsroot/src/sbin/modstat/modstat.8,v
retrieving revision 1.11
diff -u -r1.11 modstat.8
--- modstat.8 12 Aug 2012 17:20:19 -0000 1.11
+++ modstat.8 21 Jun 2013 19:13:25 -0000
@@ -32,7 +32,7 @@
.\"
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
.\"
-.Dd August 6, 2012
+.Dd June 21, 2013
.Dt MODSTAT 8
.Os
.Sh NAME
@@ -92,6 +92,9 @@
.It Li REFS
Number of references held on the module.
Disabled builtin modules will show a count of \-1 here.
+.It Li ADDRESS
+The kernel address at which the module is loaded.
+Builtin modules will show 0 here.
.It Li REQUIRES
Additional modules that must be present.
.El
Home |
Main Index |
Thread Index |
Old Index