aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/char/console.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-11 15:47:16 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-11 15:47:16 +0200
commitaf844567f069cfd53ade32c1fcdf8582865129d1 (patch)
tree522014441187c02b971e57c6e5a4f80507fe0c40 /xen/drivers/char/console.c
parent0923fba2cf02e08275c6e454906a0420baa455b5 (diff)
downloadxen-af844567f069cfd53ade32c1fcdf8582865129d1.tar.gz
xen-af844567f069cfd53ade32c1fcdf8582865129d1.tar.bz2
xen-af844567f069cfd53ade32c1fcdf8582865129d1.zip
console: prepare for non-COMn port support
Widen SERHND_IDX (and use it where needed), introduce a flush low level driver method, and remove unnecessary peeking of the common code at the (driver specific) serial port identification string in the "console=" command line option value. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/drivers/char/console.c')
-rw-r--r--xen/drivers/char/console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index e10bed5d55..d97170c641 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -539,6 +539,7 @@ void printk(const char *fmt, ...)
void __init console_init_preirq(void)
{
char *p;
+ int sh;
serial_init_preirq();
@@ -551,8 +552,9 @@ void __init console_init_preirq(void)
vga_init();
else if ( !strncmp(p, "none", 4) )
continue;
- else if ( strncmp(p, "com", 3) ||
- (sercon_handle = serial_parse_handle(p)) == -1 )
+ else if ( (sh = serial_parse_handle(p)) >= 0 )
+ sercon_handle = sh;
+ else
{
char *q = strchr(p, ',');
if ( q != NULL )