diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-30 23:08:59 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-30 23:15:11 +0200 |
commit | 8110904381e06d9c0216db626d287ad6d8f0dcf8 (patch) | |
tree | 5cfdcb851e1d74dc0799d1ea7fb78255ca778ed9 /xen | |
parent | 2f048b588ac972347a7acaf65d0c91680c4e1c27 (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 'xen')
-rw-r--r-- | xen/console.c | 3 | ||||
-rw-r--r-- | xen/console.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xen/console.c b/xen/console.c index 9798ec0..0f8b828 100644 --- a/xen/console.c +++ b/xen/console.c @@ -216,9 +216,6 @@ int hypcnclose(int dev, int flag) int hypcnprobe(struct consdev *cp) { - struct xencons_interface *my_console; - my_console = (void*) mfn_to_kv(boot_info.console_mfn); - cp->cn_dev = makedev(0, 0); cp->cn_pri = CN_INTERNAL; return 0; diff --git a/xen/console.h b/xen/console.h index fa13dc0..172abb8 100644 --- a/xen/console.h +++ b/xen/console.h @@ -21,6 +21,8 @@ #include <machine/xen.h> #include <string.h> +#include <device/cons.h> + #define hyp_console_write(str, len) hyp_console_io (CONSOLEIO_write, (len), kvtolin(str)) #define hyp_console_put(str) ({ \ @@ -30,4 +32,9 @@ extern void hyp_console_init(void); +extern int hypcnputc(dev_t dev, int c); +extern int hypcngetc(dev_t dev, int wait); +extern int hypcnprobe(struct consdev *cp); +extern int hypcninit(struct consdev *cp); + #endif /* XEN_CONSOLE_H */ |