1
0

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>
Este cometimento está contido em:
Jeff Dike
2007-07-15 23:38:54 -07:00
cometido por Linus Torvalds
ascendente 75886f21e3
cometimento d14ad81f80
6 ficheiros modificados com 38 adições e 9 eliminações

Ver ficheiro

@@ -203,22 +203,37 @@ void chan_enable_winch(struct list_head *chans, struct tty_struct *tty)
}
}
void enable_chan(struct line *line)
int enable_chan(struct line *line)
{
struct list_head *ele;
struct chan *chan;
int err;
list_for_each(ele, &line->chan_list){
chan = list_entry(ele, struct chan, list);
if(open_one_chan(chan))
err = open_one_chan(chan);
if (err) {
if (chan->primary)
goto out_close;
continue;
}
if(chan->enabled)
continue;
line_setup_irq(chan->fd, chan->input, chan->output, line,
chan);
err = line_setup_irq(chan->fd, chan->input, chan->output, line,
chan);
if (err)
goto out_close;
chan->enabled = 1;
}
return 0;
out_close:
close_chan(&line->chan_list, 0);
return err;
}
/* Items are added in IRQ context, when free_irq can't be called, and