summaryrefslogtreecommitdiffstats
path: root/sbin/dmesg
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-03-26 09:24:45 +0000
committerru <ru@FreeBSD.org>2004-03-26 09:24:45 +0000
commit74e1fa6daf8f0ba556c28fa4eeb8b3890f1c145f (patch)
tree410ec19492722a48beb197ef77450fae55973bf7 /sbin/dmesg
parentfb7b3f0382bb50d07d08b4ffa5071ad38e3f36d5 (diff)
downloadFreeBSD-src-74e1fa6daf8f0ba556c28fa4eeb8b3890f1c145f.zip
FreeBSD-src-74e1fa6daf8f0ba556c28fa4eeb8b3890f1c145f.tar.gz
Not too much point specifying -N but not specifying -M.
Diffstat (limited to 'sbin/dmesg')
-rw-r--r--sbin/dmesg/dmesg.822
-rw-r--r--sbin/dmesg/dmesg.c4
2 files changed, 12 insertions, 14 deletions
diff --git a/sbin/dmesg/dmesg.8 b/sbin/dmesg/dmesg.8
index 45b605f..a7fa95e 100644
--- a/sbin/dmesg/dmesg.8
+++ b/sbin/dmesg/dmesg.8
@@ -41,22 +41,19 @@
.Sh SYNOPSIS
.Nm
.Op Fl a
-.Op Fl M Ar core
-.Op Fl N Ar system
+.Op Fl M Ar core Op Fl N Ar system
.Sh DESCRIPTION
The
.Nm
utility displays the contents of the system message buffer.
-If neither the
-.Fl N
-nor the
+If the
.Fl M
-option is specified, the buffer is read from the currently running kernel
+option is not specified, the buffer is read from the currently running kernel
via the
.Xr sysctl 3
interface.
-Otherwise, the buffer is read from the specified core file (or from the
-default one), using the name list from the specified kernel image (or from
+Otherwise, the buffer is read from the specified core file,
+using the name list from the specified kernel image (or from
the default image).
.Pp
The options are as follows:
@@ -67,11 +64,12 @@ This includes any syslog records and
.Pa /dev/console
output.
.It Fl M
-Extract values associated with the name list from the specified core
-instead of the default
-.Pa /dev/kmem .
+Extract values associated with the name list from the specified core.
.It Fl N
-Extract the name list from the specified system instead of the default,
+If
+.Fl M
+is also specified,
+extract the name list from the specified system instead of the default,
which is the kernel image the system has booted from.
.El
.Sh FILES
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index 57f543b..08cc732 100644
--- a/sbin/dmesg/dmesg.c
+++ b/sbin/dmesg/dmesg.c
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (memf == NULL && nlistf == NULL) {
+ if (memf == NULL) {
/*
* Running kernel. Use sysctl. This gives an unwrapped
* buffer as a side effect.
@@ -196,6 +196,6 @@ main(int argc, char *argv[])
void
usage(void)
{
- (void)fprintf(stderr, "usage: dmesg [-a] [-M core] [-N system]\n");
+ (void)fprintf(stderr, "usage: dmesg [-a] [-M core [-N system]]\n");
exit(1);
}
OpenPOWER on IntegriCloud