aboutsummaryrefslogtreecommitdiff
path: root/sbin/kldstat
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/kldstat')
-rw-r--r--sbin/kldstat/kldstat.820
-rw-r--r--sbin/kldstat/kldstat.c5
2 files changed, 13 insertions, 12 deletions
diff --git a/sbin/kldstat/kldstat.8 b/sbin/kldstat/kldstat.8
index f7e7552625e3..09094da3741d 100644
--- a/sbin/kldstat/kldstat.8
+++ b/sbin/kldstat/kldstat.8
@@ -1,4 +1,6 @@
.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 1997 Doug Rabson
.\" All rights reserved.
.\"
@@ -23,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 19, 2016
+.Dd January 4, 2025
.Dt KLDSTAT 8
.Os
.Sh NAME
@@ -48,22 +50,22 @@ utility displays the status of any files dynamically linked into the
kernel.
.Pp
The following options are available:
-.Bl -tag -width indentXX
+.Bl -tag -width "-n filename"
+.It Fl d
+Show the module specific data (as int, unsigned int and unsigned long)
.It Fl h
Display the size field in a human-readable form, using unit suffixes
instead of hex values.
-.It Fl v
-Be more verbose.
-.It Fl d
-Show the module specific data (as int, unsigned int and unsigned long)
.It Fl i Ar id
Display the status of only the file with this ID.
+.It Fl m Ar modname
+Display the status of only the module with this modname.
.It Fl n Ar filename
Display the status of only the file with this filename.
.It Fl q
-Only check if file is loaded or compiled into the kernel.
-.It Fl m Ar modname
-Display the status of only the module with this modname.
+Quietly check if file is loaded or compiled into the kernel.
+.It Fl v
+Be more verbose.
.El
.Sh EXIT STATUS
.Ex -std
diff --git a/sbin/kldstat/kldstat.c b/sbin/kldstat/kldstat.c
index 60d12e0327ab..3a90f1c97eb4 100644
--- a/sbin/kldstat/kldstat.c
+++ b/sbin/kldstat/kldstat.c
@@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/module.h>
@@ -36,7 +35,7 @@
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#define PTR_WIDTH ((int)(sizeof(void *) * 2 + 2))
@@ -52,7 +51,7 @@ printmod(int modid)
{
struct module_stat stat;
- bzero(&stat, sizeof(stat));
+ memset(&stat, 0, sizeof(stat));
stat.version = sizeof(struct module_stat);
if (modstat(modid, &stat) < 0) {
warn("can't stat module id %d", modid);