projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3_Reno release
[unix-history]
/
usr
/
src
/
sys
/
kern
/
subr_prf.c
diff --git
a/usr/src/sys/kern/subr_prf.c
b/usr/src/sys/kern/subr_prf.c
index
21016b2
..
4b13fcd
100644
(file)
--- a/
usr/src/sys/kern/subr_prf.c
+++ b/
usr/src/sys/kern/subr_prf.c
@@
-3,7
+3,7
@@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)subr_prf.c 7.1
9 (Berkeley) %G%
+ * @(#)subr_prf.c 7.1
8 (Berkeley) 6/28/90
*/
#include "param.h"
*/
#include "param.h"
@@
-12,6
+12,7
@@
#include "buf.h"
#include "conf.h"
#include "reboot.h"
#include "buf.h"
#include "conf.h"
#include "reboot.h"
+#include "vm.h"
#include "msgbuf.h"
#include "user.h"
#include "proc.h"
#include "msgbuf.h"
#include "user.h"
#include "proc.h"
@@
-51,11
+52,6
@@
int (*v_getc)() = cngetc; /* "" getc from virtual console */
int (*v_poll)() = cnpoll; /* kdb hook to enable input polling */
#endif
int (*v_poll)() = cnpoll; /* kdb hook to enable input polling */
#endif
-extern cnputc(); /* standard console putc */
-extern struct tty cons; /* standard console tty */
-struct tty *constty; /* pointer to console "window" tty */
-int (*v_console)() = cnputc; /* routine to putc on virtual console */
-
/*
* Scaled down version of C Library printf.
* Used to print diagnostic information directly on console tty.
/*
* Scaled down version of C Library printf.
* Used to print diagnostic information directly on console tty.
@@
-370,7
+366,6
@@
putchar(c, flags, ttyp)
register int c;
struct tty *ttyp;
{
register int c;
struct tty *ttyp;
{
- register struct msgbuf *mbp = msgbufp;
extern int msgbufmapped;
if (panicstr)
extern int msgbufmapped;
if (panicstr)
@@
-379,26
+374,23
@@
putchar(c, flags, ttyp)
ttyp = constty;
flags |= TOTTY;
}
ttyp = constty;
flags |= TOTTY;
}
- if ((flags & TOCONS) && panicstr == 0 && tp == 0 && constty) {
- tp = constty;
- flags |= TOTTY;
- }
if ((flags & TOTTY) && ttyp && tputchar(c, ttyp) < 0 &&
(flags & TOCONS) && ttyp == constty)
constty = 0;
if ((flags & TOLOG) && c != '\0' && c != '\r' && c != 0177 &&
msgbufmapped) {
if ((flags & TOTTY) && ttyp && tputchar(c, ttyp) < 0 &&
(flags & TOCONS) && ttyp == constty)
constty = 0;
if ((flags & TOLOG) && c != '\0' && c != '\r' && c != 0177 &&
msgbufmapped) {
- if (m
bp->
msg_magic != MSG_MAGIC) {
+ if (m
sgbuf.
msg_magic != MSG_MAGIC) {
register int i;
register int i;
- m
bp->
msg_magic = MSG_MAGIC;
- m
bp->msg_bufx = mbp->
msg_bufr = 0;
+ m
sgbuf.
msg_magic = MSG_MAGIC;
+ m
sgbuf.msg_bufx = msgbuf.
msg_bufr = 0;
for (i=0; i < MSG_BSIZE; i++)
for (i=0; i < MSG_BSIZE; i++)
- m
bp->
msg_bufc[i] = 0;
+ m
sgbuf.
msg_bufc[i] = 0;
}
}
- m
bp->msg_bufc[mbp->
msg_bufx++] = c;
- if (m
bp->msg_bufx < 0 || mbp->
msg_bufx >= MSG_BSIZE)
- m
bp->
msg_bufx = 0;
+ m
sgbuf.msg_bufc[msgbuf.
msg_bufx++] = c;
+ if (m
sgbuf.msg_bufx < 0 || msgbuf.
msg_bufx >= MSG_BSIZE)
+ m
sgbuf.
msg_bufx = 0;
}
}
- (*v_console)(c);
+ if ((flags & TOCONS) && constty == 0 && c != '\0')
+ (*v_putc)(c);
}
}