summaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-30 23:08:59 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-30 23:15:11 +0200
commit8110904381e06d9c0216db626d287ad6d8f0dcf8 (patch)
tree5cfdcb851e1d74dc0799d1ea7fb78255ca778ed9 /device
parent2f048b588ac972347a7acaf65d0c91680c4e1c27 (diff)
Console declaration cleanup
* device/cons.h: Add multiple inclusion _DEVICE_CONS_H macro protector. (struct consdev): Add function members prototypes. * i386/i386/xen.h: Include <mach/xen.h>. * i386/i386at/com.c (comcnprobe, comcninit, comcngetc, comcnputc): Move prototypes... * i386/i386at/com.h: ... here. Include <device/cons.h>. * i386/i386at/cons_conf.c [MACH_HYP]: Include <xen/console.h>. [!MACH_HYP]: Include "kd.h". [!MACH_HYP && NCOM > 0]: Include "com.h". (hypcnprobe, hypcninit, hypcngetc, hypcnputc, kdcnprobe, kdcninit, kdcngetc, kdcnputc comcnprobe, comcninit, comcngetc, comcnputc): Remove prototypes. * i386/i386at/kd.c (kdcnputc): Make it return int, -1 on error, 0 on success. (kdcnprobe, kdcninit, kdcngetc, kdcnputc): Move prototypes... * i386/i386at/kd.h: ... here. Include <device/cons.h>. * xen/console.c (hypcnprobe): Remove unused `my_console' local variable. * xen/console.h: Include <device/cons.h> (hypcnputc, hypcngetc, hypcnprobe, hypcninit): Add prototypes.
Diffstat (limited to 'device')
-rw-r--r--device/cons.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/device/cons.h b/device/cons.h
index a6b04fff..c210f8c9 100644
--- a/device/cons.h
+++ b/device/cons.h
@@ -21,16 +21,18 @@
* Utah $Hdr: cons.h 1.10 94/12/14$
*/
+#ifndef _DEVICE_CONS_H
+#define _DEVICE_CONS_H
#include <sys/types.h>
struct consdev {
#ifdef MACH_KERNEL
char *cn_name; /* name of device in dev_name_list */
#endif
- int (*cn_probe)(); /* probe hardware and fill in consdev info */
- int (*cn_init)(); /* turn on as console */
- int (*cn_getc)(); /* kernel getchar interface */
- int (*cn_putc)(); /* kernel putchar interface */
+ 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 */
};
@@ -57,3 +59,4 @@ extern int cngetc(void);
extern int cnmaygetc(void);
extern void cnputc(char);
+#endif /* _DEVICE_CONS_H */