Deleted Added
full compact
kern_cons.c (49680) kern_cons.c (50092)
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91
39 * $Id: tty_cons.c,v 1.72 1999/08/09 11:02:43 phk Exp $
39 * $Id: tty_cons.c,v 1.73 1999/08/13 10:52:22 phk Exp $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/conf.h>
45#include <sys/kernel.h>
46#include <sys/reboot.h>
47#include <sys/sysctl.h>

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

94 * input (i.e., it is in graphics mode)
95 */
96
97static u_char cn_is_open; /* nonzero if logical console is open */
98static int openmode, openflag; /* how /dev/console was openned */
99static u_char cn_phys_is_open; /* nonzero if physical device is open */
100static d_close_t *cn_phys_close; /* physical device close function */
101static d_open_t *cn_phys_open; /* physical device open function */
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/conf.h>
45#include <sys/kernel.h>
46#include <sys/reboot.h>
47#include <sys/sysctl.h>

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

94 * input (i.e., it is in graphics mode)
95 */
96
97static u_char cn_is_open; /* nonzero if logical console is open */
98static int openmode, openflag; /* how /dev/console was openned */
99static u_char cn_phys_is_open; /* nonzero if physical device is open */
100static d_close_t *cn_phys_close; /* physical device close function */
101static d_open_t *cn_phys_open; /* physical device open function */
102struct consdev *cn_tab; /* physical console device info */
102struct consdev *cn_tab; /* physical console device info */
103static struct tty *cn_tp; /* physical console tty struct */
103static struct tty *cn_tp; /* physical console tty struct */
104static dev_t condev_t; /* represents the device private info */
104
105CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL);
106
107void
108cninit()
109{
110 struct consdev **list, *best_cp, *cp;
111

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

427 }
428}
429
430static void
431cn_drvinit(void *unused)
432{
433
434 cdevsw_add(&cn_cdevsw);
105
106CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL);
107
108void
109cninit()
110{
111 struct consdev **list, *best_cp, *cp;
112

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

428 }
429}
430
431static void
432cn_drvinit(void *unused)
433{
434
435 cdevsw_add(&cn_cdevsw);
435 make_dev (&cn_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "console");
436 condev_t = make_dev (&cn_cdevsw, 0,
437 UID_ROOT, GID_WHEEL, 0600, "console");
436}
437
438SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)
439
440
438}
439
440SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)
441
442