uml: handle errors on opening host side of consoles

If the host side of a console can't be opened, this will now produce visible
error messages.

enable_chan now returns a status and this is passed up to con_open and
ssl_open, which will complain if anything went wrong.

The default host device for the serial line driver is now a pts device rather
than a pty device since lots of hosts have LEGACY_PTYS disabled.  This had
always been failing on such hosts, but silently.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jeff Dike
2007-07-15 23:38:54 -07:00
committed by Linus Torvalds
parent 75886f21e3
commit d14ad81f80
6 changed files with 38 additions and 9 deletions

View File

@@ -99,7 +99,12 @@ static int con_remove(int n, char **error_out)
static int con_open(struct tty_struct *tty, struct file *filp)
{
return line_open(vts, tty);
int err = line_open(vts, tty);
if (err)
printk(KERN_ERR "Failed to open console %d, err = %d\n",
tty->index, err);
return err;
}
/* Set in an initcall, checked in an exitcall */