Deleted Added
full compact
subr_log.c (139804) subr_log.c (142709)
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * @(#)subr_log.c 8.1 (Berkeley) 6/10/93
30 */
31
32/*
33 * Error log buffer for kernel printf's.
34 */
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * @(#)subr_log.c 8.1 (Berkeley) 6/10/93
30 */
31
32/*
33 * Error log buffer for kernel printf's.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/kern/subr_log.c 139804 2005-01-06 23:35:40Z imp $");
37__FBSDID("$FreeBSD: head/sys/kern/subr_log.c 142709 2005-02-27 22:02:03Z phk $");
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/conf.h>
42#include <sys/proc.h>
43#include <sys/vnode.h>
44#include <sys/filio.h>
45#include <sys/ttycom.h>

--- 12 unchanged lines hidden (view full) ---

58static d_open_t logopen;
59static d_close_t logclose;
60static d_read_t logread;
61static d_ioctl_t logioctl;
62static d_poll_t logpoll;
63
64static void logtimeout(void *arg);
65
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/conf.h>
42#include <sys/proc.h>
43#include <sys/vnode.h>
44#include <sys/filio.h>
45#include <sys/ttycom.h>

--- 12 unchanged lines hidden (view full) ---

58static d_open_t logopen;
59static d_close_t logclose;
60static d_read_t logread;
61static d_ioctl_t logioctl;
62static d_poll_t logpoll;
63
64static void logtimeout(void *arg);
65
66#define CDEV_MAJOR 7
67static struct cdevsw log_cdevsw = {
68 .d_version = D_VERSION,
69 .d_flags = D_NEEDGIANT,
70 .d_open = logopen,
71 .d_close = logclose,
72 .d_read = logread,
73 .d_ioctl = logioctl,
74 .d_poll = logpoll,
75 .d_name = "log",
66static struct cdevsw log_cdevsw = {
67 .d_version = D_VERSION,
68 .d_flags = D_NEEDGIANT,
69 .d_open = logopen,
70 .d_close = logclose,
71 .d_read = logread,
72 .d_ioctl = logioctl,
73 .d_poll = logpoll,
74 .d_name = "log",
76 .d_maj = CDEV_MAJOR,
77};
78
79static struct logsoftc {
80 int sc_state; /* see above for possibilities */
81 struct selinfo sc_selp; /* process waiting on select call */
82 struct sigio *sc_sigio; /* information for async I/O */
83 struct callout sc_callout; /* callout to wakeup syslog */
84} logsoftc;

--- 162 unchanged lines hidden (view full) ---

247
248static void
249log_drvinit(void *unused)
250{
251
252 make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
253}
254
75};
76
77static struct logsoftc {
78 int sc_state; /* see above for possibilities */
79 struct selinfo sc_selp; /* process waiting on select call */
80 struct sigio *sc_sigio; /* information for async I/O */
81 struct callout sc_callout; /* callout to wakeup syslog */
82} logsoftc;

--- 162 unchanged lines hidden (view full) ---

245
246static void
247log_drvinit(void *unused)
248{
249
250 make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
251}
252
255SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,log_drvinit,NULL)
253SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,log_drvinit,NULL)