summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6b4c1ff)
for tprintf_open, cleaned-up types; ansify
SCCS-vsn: sys/kern/subr_prf.c 7.21
- * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
+ * Copyright (c) 1982, 1986, 1988, 1991 Regents of the University of California.
* 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.20 (Berkeley) %G%
+ * @(#)subr_prf.c 7.21 (Berkeley) %G%
#include "conf.h"
#include "reboot.h"
#include "msgbuf.h"
#include "conf.h"
#include "reboot.h"
#include "msgbuf.h"
#include "proc.h"
#include "ioctl.h"
#include "vnode.h"
#include "proc.h"
#include "ioctl.h"
#include "vnode.h"
*
* printf("prefix: %r, other stuff\n", fmt, &arg1);
*/
*
* printf("prefix: %r, other stuff\n", fmt, &arg1);
*/
-#if defined(tahoe)
-int consintr;
-#endif
+
+int consintr = 1; /* ok to handle console interrupts? */
/*VARARGS1*/
printf(fmt, args)
char *fmt;
unsigned args;
{
/*VARARGS1*/
printf(fmt, args)
char *fmt;
unsigned args;
{
register int savintr;
savintr = consintr, consintr = 0; /* disable interrupts */
register int savintr;
savintr = consintr, consintr = 0; /* disable interrupts */
prf(fmt, &args, TOCONS | TOLOG, (struct tty *)NULL);
if (!panicstr)
logwakeup();
prf(fmt, &args, TOCONS | TOLOG, (struct tty *)NULL);
if (!panicstr)
logwakeup();
consintr = savintr; /* reenable interrupts */
consintr = savintr; /* reenable interrupts */
+tprintf_open(p)
+ register struct proc *p;
- register struct proc *p = curproc;
if (p->p_flag & SCTTY && p->p_session->s_ttyvp) {
SESSHOLD(p->p_session);
if (p->p_flag & SCTTY && p->p_session->s_ttyvp) {
SESSHOLD(p->p_session);
- return ((tpr_t)p->p_session);
+ return ((tpr_t) p->p_session);
tprintf_close(sess)
tpr_t sess;
{
if (sess)
tprintf_close(sess)
tpr_t sess;
{
if (sess)
+ SESSRELE((struct session *) sess);
* with the given session.
*/
/*VARARGS2*/
* with the given session.
*/
/*VARARGS2*/
-tprintf(sess, fmt, args)
- register tpr_t sess;
+tprintf(tpr, fmt, args)
+ tpr_t tpr;
char *fmt;
unsigned args;
{
char *fmt;
unsigned args;
{
+ register struct session *sess = (struct session *)tpr;
+ struct tty *tp = NULL;
int flags = TOLOG;
logpri(LOG_INFO);
int flags = TOLOG;
logpri(LOG_INFO);
- if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp, 0))
+ if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp, 0)) {
- prf(fmt, &args, flags, sess->s_ttyp);
+ tp = sess->s_ttyp;
+ }
+ prf(fmt, &args, flags, tp);
/*
* Log writes to the log buffer,
/*
* Log writes to the log buffer,
unsigned args;
{
register s = splhigh();
unsigned args;
{
register s = splhigh();
logpri(level);
prf(fmt, &args, TOLOG, (struct tty *)NULL);
logpri(level);
prf(fmt, &args, TOLOG, (struct tty *)NULL);