Module Name: src
Committed By: pgoyette
Date: Wed Nov 4 04:30:42 UTC 2015
Modified Files:
src/sbin/modstat: main.c modstat.8
Log Message:
Add FLAGS to the module data displayed. Reduce some of the extra
inter-column white-space to (partly) compensate for the additional
column.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/modstat/main.c
cvs rdiff -u -r1.15 -r1.16 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.18 src/sbin/modstat/main.c:1.19
--- src/sbin/modstat/main.c:1.18 Wed Oct 23 18:57:40 2013
+++ src/sbin/modstat/main.c Wed Nov 4 04:30:42 2015
@@ -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 @@ main(int argc, char **argv)
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 @@ main(int argc, char **argv)
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);
Index: src/sbin/modstat/modstat.8
diff -u src/sbin/modstat/modstat.8:1.15 src/sbin/modstat/modstat.8:1.16
--- src/sbin/modstat/modstat.8:1.15 Thu Oct 24 13:00:21 2013
+++ src/sbin/modstat/modstat.8 Wed Nov 4 04:30:42 2015
@@ -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 dur
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.