Module Name: src
Committed By: riz
Date: Wed Jun 26 17:55:38 UTC 2013
Modified Files:
src/sbin/modstat: main.c modstat.8
Log Message:
Display the load address of modules. PR bin/47951.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/modstat/main.c
cvs rdiff -u -r1.11 -r1.12 src/sbin/modstat/modstat.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/modstat/main.c
diff -u src/sbin/modstat/main.c:1.15 src/sbin/modstat/main.c:1.16
--- src/sbin/modstat/main.c:1.15 Tue Aug 7 01:19:05 2012
+++ src/sbin/modstat/main.c Wed Jun 26 17:55:38 2013
@@ -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);
Index: src/sbin/modstat/modstat.8
diff -u src/sbin/modstat/modstat.8:1.11 src/sbin/modstat/modstat.8:1.12
--- src/sbin/modstat/modstat.8:1.11 Sun Aug 12 17:20:19 2012
+++ src/sbin/modstat/modstat.8 Wed Jun 26 17:55:38 2013
@@ -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