Commit Graph

40 Commits

Author SHA1 Message Date
markm
3382584a53 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
ru
4d4cec31b2 Not too much point specifying -N but not specifying -M. 2004-03-26 09:24:45 +00:00
iedowse
8b1fc57339 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
2004-02-08 23:08:53 +00:00
iedowse
84628eff1c 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.
2004-02-05 21:07:50 +00:00
iedowse
4b4bacfb9a 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
489743d041 bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
johan
05077b3b6a These are WARNS=2 clean, try to keep them that way. 2003-02-23 13:25:02 +00:00
trhodes
8dde7c54b8 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
bde
a1b0d4b756 Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:57:08 +00:00
charnier
548d38d27c The .Nm utility 2002-07-06 19:34:18 +00:00
imp
2abd102587 o Remove __P
o Use ANSI function definitions
o mark usage() as __dead2
2002-03-19 13:29:39 +00:00
obrien
a537f22ad4 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
5bf4fe94c4 mdoc(7) police: compute the exact tag width. 2001-08-10 10:09:00 +00:00
sheldonh
bfb16f729c 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
7b70d8e03b add -a to usage()
Submitted by:	Ashley Penney <ashp@unloved.org>
MFC after:	3 days
2001-07-14 21:56:04 +00:00
ru
cb3283b5da mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
tmm
3704519ccb Update the dmesg man page to reflect the recent changes to dmesg.
Reviewed by:	ru
2001-07-05 12:32:57 +00:00
tmm
ae1087b3dd 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
e7c03cd6b0 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
e2a472a47a Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
ru
a455e0b30d Backout -a restriction hack.
Requested by:	rwatson
2001-02-26 08:09:51 +00:00
ru
884e483150 Restrict -a to root only.
PR:		bin/25337
2001-02-24 10:16:54 +00:00
sheldonh
00e95ffe50 Fix hard sentence break introduced in previous commit. 2000-12-20 13:23:50 +00:00
phk
0a600ec825 Add a -a option to show the entire message buffer. 2000-12-17 19:05:17 +00:00
ru
d16dd614f6 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
jedgar
137dcbe72f Remove obsolete /dev/drum references
Reviewed by:	alex, asmodai, billf
2000-10-29 12:19:52 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
hoek
f25124165a 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
b48ede248a Use .Pa for filenames. Use .Bl/.El in FILES section. Remove unused #includes. 1998-06-04 06:51:14 +00:00
phk
8aa81c2fdf Make the size of the msgbuf (dmesg) a "normal" option. 1998-05-19 08:58:53 +00:00
imp
88b6081b7e 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
4997d39dce Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
jkh
9c0cd3f9df 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
10a7419102 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
401479292e Add relevant files to the FILES section
Submitted by:	Julian H Stacey
1996-08-03 19:13:35 +00:00
alex
4674754eec Add #include <err.h>. 1996-06-19 01:49:01 +00:00
ache
d461006ff1 Add setlocale LC_CTYPE 1995-10-23 23:36:55 +00:00
dg
17e7606224 Converted 'vmunix' to 'kernel'. 1994-08-05 09:14:37 +00:00
wollman
8e1bbb06c3 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