summaryrefslogtreecommitdiff
path: root/sys/kern/subr_log.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-03 17:20:29 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-03 17:20:29 +0000
commita69a4a568209bb69852224e2cd6f6394ed4da746 (patch)
tree35d8778bf8e995cb348c0bb9d78d38b7a7e6e356 /sys/kern/subr_log.c
parent5aeba8440e8d2256e4b716030f97e3bf493b725a (diff)
From NetBSD: 960217 merge
Diffstat (limited to 'sys/kern/subr_log.c')
-rw-r--r--sys/kern/subr_log.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index ce7345fedee..d676732a928 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -1,4 +1,5 @@
-/* $NetBSD: subr_log.c,v 1.8 1994/10/30 21:47:47 cgd Exp $ */
+/* $OpenBSD: subr_log.c,v 1.2 1996/03/03 17:20:00 niklas Exp $ */
+/* $NetBSD: subr_log.c,v 1.10 1996/02/09 18:59:58 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -46,6 +47,10 @@
#include <sys/ioctl.h>
#include <sys/msgbuf.h>
#include <sys/file.h>
+#include <sys/signalvar.h>
+#include <sys/syslog.h>
+
+#include <kern/kern_conf.h>
#define LOG_RDPRI (PZERO + 1)
@@ -93,7 +98,8 @@ logopen(dev, flags, mode, p)
int
logclose(dev, flag, mode, p)
dev_t dev;
- int flag;
+ int flag, mode;
+ struct proc *p;
{
log_open = 0;
@@ -120,8 +126,9 @@ logread(dev, uio, flag)
return (EWOULDBLOCK);
}
logsoftc.sc_state |= LOG_RDWAIT;
- if (error = tsleep((caddr_t)mbp, LOG_RDPRI | PCATCH,
- "klog", 0)) {
+ error = tsleep((caddr_t)mbp, LOG_RDPRI | PCATCH,
+ "klog", 0);
+ if (error) {
splx(s);
return (error);
}
@@ -181,7 +188,7 @@ logwakeup()
if (logsoftc.sc_state & LOG_ASYNC) {
if (logsoftc.sc_pgid < 0)
gsignal(-logsoftc.sc_pgid, SIGIO);
- else if (p = pfind(logsoftc.sc_pgid))
+ else if ((p = pfind(logsoftc.sc_pgid)) != NULL)
psignal(p, SIGIO);
}
if (logsoftc.sc_state & LOG_RDWAIT) {
@@ -192,11 +199,12 @@ logwakeup()
/*ARGSUSED*/
int
-logioctl(dev, com, data, flag)
+logioctl(dev, com, data, flag, p)
dev_t dev;
u_long com;
caddr_t data;
int flag;
+ struct proc *p;
{
long l;
int s;