From: Olof Johansson Date: Thu, 7 Sep 2006 20:18:08 +0000 (-0500) Subject: [POWERPC] Quiet hvc_console console output on failed opens X-Git-Tag: v2.6.19-rc1~1300^2~31 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87fd7724d4022913ae8dbee3ed55cd04f2c316a6;p=linux-2.6 [POWERPC] Quiet hvc_console console output on failed opens No other tty driver will print on the console when the open of it fails. On systems that happen to be configured for both ttyS0 and hvc0 console, this will keep flooding the console output. This is most likely to happen with systems booted between with and without hypervisor from the same filesystem. Let's just remove it. When it's really needed (i.e. when the open fails and someone is trying to debug it), noone will see the output anyway. And init will report the opens failing in due time through the syslog. Signed-off-by: Olof Johansson Acked-by: Ryan S. Arnold Signed-off-by: Paul Mackerras --- diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index dbee8bed05..1d1bd34b7f 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -320,10 +320,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) struct kobject *kobjp; /* Auto increments kobject reference if found. */ - if (!(hp = hvc_get_by_index(tty->index))) { - printk(KERN_WARNING "hvc_console: tty open failed, no vty associated with tty.\n"); + if (!(hp = hvc_get_by_index(tty->index))) return -ENODEV; - } spin_lock_irqsave(&hp->lock, flags); /* Check and then increment for fast path open. */