summaryrefslogtreecommitdiff
path: root/sbin/modstat
diff options
context:
space:
mode:
authorriz <riz@NetBSD.org>2013-06-26 17:55:38 +0000
committerriz <riz@NetBSD.org>2013-06-26 17:55:38 +0000
commit61b57a82ad3c96568e45950affdff8020fc5a72c (patch)
tree3fbf5c97c619e968bedb309b8e4fd2a283257203 /sbin/modstat
parent2a634a3bb01ac679075856293d41dc5e23b62301 (diff)
Display the load address of modules. PR bin/47951.
Diffstat (limited to 'sbin/modstat')
-rw-r--r--sbin/modstat/main.c14
-rw-r--r--sbin/modstat/modstat.87
2 files changed, 12 insertions, 9 deletions
diff --git a/sbin/modstat/main.c b/sbin/modstat/main.c
index c3d98178282..7d2a01a625c 100644
--- a/sbin/modstat/main.c
+++ b/sbin/modstat/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.15 2012/08/07 01:19:05 jnemeth Exp $ */
+/* $NetBSD: main.c,v 1.16 2013/06/26 17:55:38 riz Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.15 2012/08/07 01:19:05 jnemeth Exp $");
+__RCSID("$NetBSD: main.c,v 1.16 2013/06/26 17:55:38 riz Exp $");
#endif /* !lint */
#include <sys/module.h>
@@ -175,9 +175,9 @@ main(int argc, char **argv)
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 @@ main(int argc, char **argv)
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);
diff --git a/sbin/modstat/modstat.8 b/sbin/modstat/modstat.8
index 26708726ed2..64b3405f583 100644
--- a/sbin/modstat/modstat.8
+++ b/sbin/modstat/modstat.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: modstat.8,v 1.11 2012/08/12 17:20:19 wiz Exp $
+.\" $NetBSD: modstat.8,v 1.12 2013/06/26 17:55:38 riz Exp $
.\"
.\" Copyright (c) 1993 Christopher G. Demetriou
.\" All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
.\"
-.Dd August 6, 2012
+.Dd June 26, 2013
.Dt MODSTAT 8
.Os
.Sh NAME
@@ -92,6 +92,9 @@ Size of the module in bytes.
.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