diff options
author | phk <phk@FreeBSD.org> | 2000-12-20 21:50:37 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-12-20 21:50:37 +0000 |
commit | 04b71d6b6d5b879ea0b817c773f4ce96507247f6 (patch) | |
tree | 18b700d20c419e56eb1134864e3113062e525f28 /sys/kern/subr_log.c | |
parent | 05d0cf88f1bd8f0d0cc7cb861444fa750759e7ba (diff) | |
download | FreeBSD-src-04b71d6b6d5b879ea0b817c773f4ce96507247f6.zip FreeBSD-src-04b71d6b6d5b879ea0b817c773f4ce96507247f6.tar.gz |
Replace logwakeup() with "int msgbuftrigger". There is little
point in calling a function just to set a flag.
Keep better track of the syslog FAC/PRI code and try to DTRT if
they mingle.
Log all writes to /dev/console to syslog with <console.info>
priority. The formatting is not preserved, there is no robust,
way of doing it. (Ideas with patches welcome).
Diffstat (limited to 'sys/kern/subr_log.c')
-rw-r--r-- | sys/kern/subr_log.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 8580f79..d63dfb6 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -56,7 +56,6 @@ #define LOG_ASYNC 0x04 #define LOG_RDWAIT 0x08 -#define LOG_NEEDWAKEUP 0x10 static d_open_t logopen; static d_close_t logclose; @@ -186,22 +185,13 @@ logpoll(dev_t dev, int events, struct proc *p) return (revents); } -void -logwakeup(void) -{ - - if (!log_open) - return; - logsoftc.sc_state |= LOG_NEEDWAKEUP; -} - static void logtimeout(void *arg) { - if ((logsoftc.sc_state & LOG_NEEDWAKEUP) == 0) + if (msgbuftrigger == 0) return; - logsoftc.sc_state &= ~LOG_NEEDWAKEUP; + msgbuftrigger = 0; if (!log_open) return; selwakeup(&logsoftc.sc_selp); |