Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/modstat Display the load address of modules. PR bin/47951.
details: https://anonhg.NetBSD.org/src/rev/60d59d6f7190
branches: trunk
changeset: 787617:60d59d6f7190
user: riz <riz%NetBSD.org@localhost>
date: Wed Jun 26 17:55:38 2013 +0000
description:
Display the load address of modules. PR bin/47951.
diffstat:
sbin/modstat/main.c | 14 +++++++-------
sbin/modstat/modstat.8 | 7 +++++--
2 files changed, 12 insertions(+), 9 deletions(-)
diffs (71 lines):
diff -r 84463f472eb1 -r 60d59d6f7190 sbin/modstat/main.c
--- a/sbin/modstat/main.c Wed Jun 26 17:18:52 2013 +0000
+++ b/sbin/modstat/main.c Wed Jun 26 17:55:38 2013 +0000
@@ -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 @@
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);
diff -r 84463f472eb1 -r 60d59d6f7190 sbin/modstat/modstat.8
--- a/sbin/modstat/modstat.8 Wed Jun 26 17:18:52 2013 +0000
+++ b/sbin/modstat/modstat.8 Wed Jun 26 17:55:38 2013 +0000
@@ -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 @@
.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