blob: 6a0ae85070b03941c88e0ca780c3391c543b863b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* Copyright (c) 1988-1994, The University of Utah and
* the Computer Systems Laboratory at the University of Utah (CSL).
* All rights reserved.
*
* Permission to use, copy, modify and distribute this software is hereby
* granted provided that (1) source code retains these copyright, permission,
* and disclaimer notices, and (2) redistributions including binaries
* reproduce the notices in supporting documentation, and (3) all advertising
* materials mentioning features or use of this software display the following
* acknowledgement: ``This product includes software developed by the
* Computer Systems Laboratory at the University of Utah.''
*
* THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
* IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
* ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* CSL requests users of this software to return to csl-dist@cs.utah.edu any
* improvements that they make and grant CSL redistribution rights.
*
* Utah $Hdr: cons.h 1.10 94/12/14$
*/
#ifndef _DEVICE_CONS_H
#define _DEVICE_CONS_H
#include <sys/types.h>
struct consdev {
char *cn_name; /* name of device in dev_name_list */
int (*cn_probe)(struct consdev *cp); /* probe hardware and fill in consdev info */
int (*cn_init)(struct consdev *cp); /* turn on as console */
int (*cn_getc)(dev_t dev, int wait); /* kernel getchar interface */
int (*cn_putc)(dev_t dev, int c); /* kernel putchar interface */
dev_t cn_dev; /* major/minor of device */
short cn_pri; /* pecking order; the higher the better */
};
/* values for cn_pri - reflect our policy for console selection */
#define CN_DEAD 0 /* device doesn't exist */
#define CN_NORMAL 1 /* device exists but is nothing special */
#define CN_INTERNAL 2 /* "internal" bit-mapped display */
#define CN_REMOTE 3 /* serial interface with remote bit set */
/* XXX */
#define CONSMAJOR 0
#define CONSBUFSIZE 1024
#ifdef KERNEL
extern struct consdev constab[];
#endif
extern void cninit(void);
extern int cngetc(void);
extern int cnmaygetc(void);
extern void cnputc(char);
#endif /* _DEVICE_CONS_H */
|