]> git.saurik.com Git - apple/xnu.git/blame - bsd/dev/i386/cons.h
xnu-344.34.tar.gz
[apple/xnu.git] / bsd / dev / i386 / cons.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
de355530
A
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
1c79356b 11 *
de355530
A
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
de355530
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * Copyright (c) 1987 NeXT, Inc.
24 */
25
26struct consdev {
27 char *cn_name; /* name of device in dev_name_list */
28 int (*cn_probe)(); /* probe hardware and fill in consdev info */
29 int (*cn_init)(); /* turn on as console */
30 int (*cn_getc)(); /* kernel getchar interface */
31 int (*cn_putc)(); /* kernel putchar interface */
32 struct tty *cn_tp; /* tty structure for console device */
33 dev_t cn_dev; /* major/minor of device */
34 short cn_pri; /* pecking order; the higher the better */
35};
36
37/* values for cn_pri - reflect our policy for console selection */
38#define CN_DEAD 0 /* device doesn't exist */
39#define CN_NORMAL 1 /* device exists but is nothing special */
40#define CN_INTERNAL 2 /* "internal" bit-mapped display */
41#define CN_REMOTE 3 /* serial interface with remote bit set */
42
43/* XXX */
44#define CONSMAJOR 0
45
46#ifdef KERNEL
47
48#include <sys/types.h>
49
50extern struct consdev constab[];
51extern struct consdev *cn_tab;
52extern struct tty *cn_tty;
53
54extern struct tty cons;
55extern struct tty *constty; /* current console device */
56#endif
57