diff options
author | jlemon <jlemon@FreeBSD.org> | 1999-06-01 18:20:36 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 1999-06-01 18:20:36 +0000 |
commit | b5d4171ff60677d883a8f4fdf912b23d5de9a433 (patch) | |
tree | 37d000a80ae9f6ab9ca36152f3fd48600aa82ae6 /sys/kern/subr_prf.c | |
parent | d4d2c873635d9e513e6e5720150fd4e44067d68f (diff) | |
download | FreeBSD-src-b5d4171ff60677d883a8f4fdf912b23d5de9a433.zip FreeBSD-src-b5d4171ff60677d883a8f4fdf912b23d5de9a433.tar.gz |
Unifdef VM86.
Reviewed by: silence on on -current
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 424ac9f..c1937b7 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 - * $Id: subr_prf.c,v 1.50 1998/09/06 06:25:04 ache Exp $ + * $Id: subr_prf.c,v 1.51 1998/12/03 04:45:56 archie Exp $ */ #include <sys/param.h> @@ -674,10 +674,24 @@ msglogchar(int c, void *dummyarg) } } +static void +msgbufcopy(struct msgbuf *oldp) +{ + int pos; + + pos = oldp->msg_bufr; + while (pos != oldp->msg_bufx) { + msglogchar(oldp->msg_ptr[pos], NULL); + if (++pos >= oldp->msg_size) + pos = 0; + } +} + void msgbufinit(void *ptr, size_t size) { char *cp; + static struct msgbuf *oldp = NULL; cp = (char *)ptr; msgbufp = (struct msgbuf *) (cp + size - sizeof(*msgbufp)); @@ -687,7 +701,10 @@ msgbufinit(void *ptr, size_t size) msgbufp->msg_size = (char *)msgbufp - cp; msgbufp->msg_ptr = cp; } + if (msgbufmapped && oldp != msgbufp) + msgbufcopy(oldp); msgbufmapped = 1; + oldp = msgbufp; } #include "opt_ddb.h" |