Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/modstat Add FLAGS to the module data displayed. Reduce...
details: https://anonhg.NetBSD.org/src/rev/e602b41530d6
branches: trunk
changeset: 341390:e602b41530d6
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Nov 04 04:30:42 2015 +0000
description:
Add FLAGS to the module data displayed. Reduce some of the extra
inter-column white-space to (partly) compensate for the additional
column.
diffstat:
sbin/modstat/main.c | 16 ++++++++--------
sbin/modstat/modstat.8 | 9 +++++++--
2 files changed, 15 insertions(+), 10 deletions(-)
diffs (74 lines):
diff -r 6020b1023c59 -r e602b41530d6 sbin/modstat/main.c
--- a/sbin/modstat/main.c Wed Nov 04 04:28:58 2015 +0000
+++ b/sbin/modstat/main.c Wed Nov 04 04:30:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 2013/10/23 18:57:40 mbalmer Exp $ */
+/* $NetBSD: main.c,v 1.19 2015/11/04 04:30:42 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.18 2013/10/23 18:57:40 mbalmer Exp $");
+__RCSID("$NetBSD: main.c,v 1.19 2015/11/04 04:30:42 pgoyette Exp $");
#endif /* !lint */
#include <sys/module.h>
@@ -175,9 +175,9 @@
if (maxnamelen < namelen)
maxnamelen = namelen;
}
- printf("%-*s %-10s %-10s %-5s %-16s %-8s %s \n",
- (int)maxnamelen, "NAME", "CLASS", "SOURCE", "REFS", "ADDRESS",
- "SIZE", "REQUIRES");
+ printf("%-*s %-8s %-8s %-6s %-5s %-16s %-7s %s \n",
+ (int)maxnamelen, "NAME", "CLASS", "SOURCE", "FLAGS", "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 %-16" PRIx64 " %-8s %s\n",
- (int)maxnamelen, ms->ms_name, class, source, ms->ms_refcnt,
- ms->ms_addr, sbuf, ms->ms_required);
+ printf("%-*s %-8s %-8s 0x%-4x %-5d %-16" PRIx64 " %-7s %s\n",
+ (int)maxnamelen, ms->ms_name, class, source, ms->ms_flags,
+ ms->ms_refcnt, ms->ms_addr, sbuf, ms->ms_required);
}
exit(EXIT_SUCCESS);
diff -r 6020b1023c59 -r e602b41530d6 sbin/modstat/modstat.8
--- a/sbin/modstat/modstat.8 Wed Nov 04 04:28:58 2015 +0000
+++ b/sbin/modstat/modstat.8 Wed Nov 04 04:30:42 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: modstat.8,v 1.15 2013/10/24 13:00:21 mbalmer Exp $
+.\" $NetBSD: modstat.8,v 1.16 2015/11/04 04:30:42 pgoyette 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 October 24, 2013
+.Dd November 4, 2015
.Dt MODSTAT 8
.Os
.Sh NAME
@@ -89,6 +89,11 @@
indicates that the module was loaded from the file system.
.It Li SIZE
Size of the module in bytes.
+.It Li FLAGS
+The module's flags.
+See
+.Xr modctl 2
+for details.
.It Li REFS
Number of references held on the module.
Disabled builtin modules will show a count of \-1 here.
Home |
Main Index |
Thread Index |
Old Index