Commit Graph

36 Commits

Author SHA1 Message Date
iedowse
6bb0e5cb46 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
2003-06-22 02:18:31 +00:00
obrien
baba414b75 bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
johan
1285e0e22b These are WARNS=2 clean, try to keep them that way. 2003-02-23 13:25:02 +00:00
trhodes
136be46680 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
bde
a8e6e41c88 Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:57:08 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00
imp
6718ce496e o Remove __P
o Use ANSI function definitions
o mark usage() as __dead2
2002-03-19 13:29:39 +00:00
obrien
9baf2f1b03 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
ru
f0df63853f mdoc(7) police: compute the exact tag width. 2001-08-10 10:09:00 +00:00
sheldonh
1382e23198 Add mention of /var/run/dmesg.boot.
Yes, this isn't really the right place for it.  No, it really can't
remain undocumented.
2001-08-08 21:02:55 +00:00
billf
5e7c07338e add -a to usage()
Submitted by:	Ashley Penney <ashp@unloved.org>
MFC after:	3 days
2001-07-14 21:56:04 +00:00
ru
7cef49ff86 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
tmm
7ad9e5a6ac Update the dmesg man page to reflect the recent changes to dmesg.
Reviewed by:	ru
2001-07-05 12:32:57 +00:00
tmm
71a96b46d0 Use the kern.msgbuf sysctl to get the message buffer on a running
kernel, and remove setgid kmem, which is not needed any more.
2001-07-03 19:49:31 +00:00
ru
86642a4ab4 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
56b5d7535b Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
ru
2ae83a7282 Backout -a restriction hack.
Requested by:	rwatson
2001-02-26 08:09:51 +00:00
ru
f4bc17fe3e Restrict -a to root only.
PR:		bin/25337
2001-02-24 10:16:54 +00:00
sheldonh
eb97254875 Fix hard sentence break introduced in previous commit. 2000-12-20 13:23:50 +00:00
phk
cb3b526426 Add a -a option to show the entire message buffer. 2000-12-17 19:05:17 +00:00
ru
ea31070695 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
jedgar
14485f4b7a Remove obsolete /dev/drum references
Reviewed by:	alex, asmodai, billf
2000-10-29 12:19:52 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
hoek
4f1654fff4 Use an error message that more clearly indites(sp?) an out-of-sync
kernel+userland when that is the case.

PR:		bin/7414
1998-07-27 18:53:45 +00:00
charnier
40a59b8d3d Use .Pa for filenames. Use .Bl/.El in FILES section. Remove unused #includes. 1998-06-04 06:51:14 +00:00
phk
00b3b49e1b Make the size of the msgbuf (dmesg) a "normal" option. 1998-05-19 08:58:53 +00:00
imp
167db52912 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
peter
4968036f61 Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
jkh
808a36ef65 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.
1997-01-14 07:20:47 +00:00
bde
2d23099e28 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.
1996-09-21 08:11:22 +00:00
markm
6be39a47d9 Add relevant files to the FILES section
Submitted by:	Julian H Stacey
1996-08-03 19:13:35 +00:00
alex
2eab68c044 Add #include <err.h>. 1996-06-19 01:49:01 +00:00
ache
4379ab04ff Add setlocale LC_CTYPE 1995-10-23 23:36:55 +00:00
dg
6b466831f4 Converted 'vmunix' to 'kernel'. 1994-08-05 09:14:37 +00:00
wollman
57ea13e98c 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.
1994-08-05 02:42:42 +00:00
rgrimes
d038e02fd6 BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00