History log of /freebsd-10.0-release/sbin/dmesg/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


251618 11-Jun-2013 flo

Move the check whether the clear flag is set. This has 2 advantages

- When operating on a core file (-M) and -c is specified we don't clear
the message buffer of the running system.
- If we don't have permission to clear the buffer print the error message
only. That's what Linux does in this case, where this feature was ported
from, and it ensures that the error message doesn't get lost in the noise.

Discussed with: antoine, cognet
Approved by: cognet


250451 10-May-2013 eadler

Bump .Dd for recent content change.

Reported by: delphij


250430 10-May-2013 eadler

Add support for 'dmesg -c' which clears the dmesg buffer after it has
been printed. This provides compatibility with other *nix systems
(including Linux).

While here use stdbool booleans for 'all'.

PR: bin/178295
Submitted by: Levent Serinol <lserinol@gmail.com>
Reviewed by: will


227081 04-Nov-2011 ed

Add missing static keywords for global variables to tools in sbin/.

These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.


198236 19-Oct-2009 ru

Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein


156076 27-Feb-2006 dwmalone

Avoid moving onto a new line while testing if there is a syslog priority
in the buffer. This isn't exactly the patch that Stephen submitted, but
is based on one of his suggestions.

PR: 93841
Submitted by: Stephen Montgomery-Smith <stephen@math.missouri.edu>
MFC after: 2 weeks


140383 17-Jan-2005 delphij

WARNS=6 cleanup:

- signed/unsigned conform.
- Better initialization of nlist[]. I think we should have
something like NLIST_NULL instead of the current (ugly)
form...


136491 13-Oct-2004 schweikh

Print a usage message if a non-option is specified.
MFC after: 3 weeks


136092 03-Oct-2004 stefanf

Don't add integers to void pointers.


128073 09-Apr-2004 markm

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


127448 26-Mar-2004 ru

Not too much point specifying -N but not specifying -M.


125610 08-Feb-2004 iedowse

Further simplify the code for printing the message buffer:
- Ensure that the buffer ends with "\n\0" to avoid special cases
and allow the use of strtol().
- Use strvisx() on each complete line instead of character by
character.

Submitted by: bde
MFC after: 1 week


125497 05-Feb-2004 iedowse

Don't print the oldest line in the message buffer if the buffer is
full, since that line is almost always incomplete. Make the parsing
of <%d> lines more strict.

Also simplify the logic a little:
- Start off by making the buffer linear so that we don't have to
deal with it wrapping around (suggested by bde).
- Process line by line rather than byte at a time.


116660 22-Jun-2003 iedowse

Replace the code for reading and writing the kernel message buffer
with a new implementation that has a mostly reentrant "addchar"
routine, supports multiple message buffers in the kernel, and hides
the implementation details from callers.

The new code uses a kind of sequence number to represend the current
read and write positions in the buffer. This approach (suggested
mainly by bde) permits the read and write pointers to be maintained
separately, which reduces the number of atomic operations that are
required. The "mostly reentrant" above refers to the way that while
it is now always safe to have any number of concurrent writers,
readers could see the message buffer after a writer has advanced
the pointers but before it has witten the new character.

Discussed on: freebsd-arch


114515 02-May-2003 obrien

bufpos is used in size_t contexts, so make it one.


111309 23-Feb-2003 johan

These are WARNS=2 clean, try to keep them that way.


102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


102069 18-Aug-2002 bde

Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.


99501 06-Jul-2002 charnier

The .Nm utility


92697 19-Mar-2002 imp

o Remove __P
o Use ANSI function definitions
o mark usage() as __dead2


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


81416 10-Aug-2001 ru

mdoc(7) police: compute the exact tag width.


81306 08-Aug-2001 sheldonh

Add mention of /var/run/dmesg.boot.

Yes, this isn't really the right place for it. No, it really can't
remain undocumented.


79736 14-Jul-2001 billf

add -a to usage()

Submitted by: Ashley Penney <ashp@unloved.org>
MFC after: 3 days


79530 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79318 05-Jul-2001 tmm

Update the dmesg man page to reflect the recent changes to dmesg.

Reviewed by: ru


79154 03-Jul-2001 tmm

Use the kern.msgbuf sysctl to get the message buffer on a running
kernel, and remove setgid kmem, which is not needed any more.


74815 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74531 20-Mar-2001 ru

Set the default manual section for sbin/ to 8.


73076 26-Feb-2001 ru

Backout -a restriction hack.

Requested by: rwatson


72973 24-Feb-2001 ru

Restrict -a to root only.

PR: bin/25337


70226 20-Dec-2000 sheldonh

Fix hard sentence break introduced in previous commit.


70123 17-Dec-2000 phk

Add a -a option to show the entire message buffer.


68960 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


67870 29-Oct-2000 jedgar

Remove obsolete /dev/drum references

Reviewed by: alex, asmodai, billf


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


37893 27-Jul-1998 hoek

Use an error message that more clearly indites(sp?) an out-of-sync
kernel+userland when that is the case.

PR: bin/7414


36634 04-Jun-1998 charnier

Use .Pa for filenames. Use .Bl/.El in FILES section. Remove unused #includes.


36179 19-May-1998 phk

Make the size of the msgbuf (dmesg) a "normal" option.


24359 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


22990 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


18439 21-Sep-1996 bde

Who would have though that dmesg didn't understand message buffers?

Fixed the following bugs:
- the buffer was reprinted endlessly when msg.bufx == 0 and (for a
different reason) when msg.bufx == 1.
- the last byte of the buffer wasn't printed except in the the infinite
loop cases.
- the comment about walking the buffer didn't match the (correct) code.
- minor -Wall and style bugs.
Not fixed:
- excessive newline processing which hid the non-printing of the last
byte of the buffer.


17411 03-Aug-1996 markm

Add relevant files to the FILES section
Submitted by: Julian H Stacey


16497 19-Jun-1996 alex

Add #include <err.h>.


11749 23-Oct-1995 ache

Add setlocale LC_CTYPE


1856 05-Aug-1994 dg

Converted 'vmunix' to 'kernel'.


1855 05-Aug-1994 wollman

Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.


1559 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1558,
which included commits to RCS files with non-trunk default branches.