From 8110904381e06d9c0216db626d287ad6d8f0dcf8 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 30 Aug 2011 23:08:59 +0200 Subject: 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 . * i386/i386at/com.c (comcnprobe, comcninit, comcngetc, comcnputc): Move prototypes... * i386/i386at/com.h: ... here. Include . * i386/i386at/cons_conf.c [MACH_HYP]: Include . [!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 . * xen/console.c (hypcnprobe): Remove unused `my_console' local variable. * xen/console.h: Include (hypcnputc, hypcngetc, hypcnprobe, hypcninit): Add prototypes. --- xen/console.c | 3 --- xen/console.h | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'xen') 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 #include +#include + #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 */ -- cgit v1.2.3