From: Ben Gras Date: Thu, 4 Jan 2007 12:06:04 +0000 (+0000) Subject: Don't let rs232 code send REVIVEs. X-Git-Tag: v3.1.3~124 X-Git-Url: http://zhaoyanbai.com/repos/%24relpath%24tabs.css?a=commitdiff_plain;h=753f7bebdef82f93d3b44a515bdc20f8be8cc254;p=minix.git Don't let rs232 code send REVIVEs. --- diff --git a/drivers/tty/rs232.c b/drivers/tty/rs232.c index bcaa6907e..02176b8f9 100644 --- a/drivers/tty/rs232.c +++ b/drivers/tty/rs232.c @@ -351,15 +351,26 @@ int try; tp->tty_outcum += count; if ((tp->tty_outleft -= count) == 0) { /* Output is finished, reply to the writer. */ - tty_reply(tp->tty_outrepcode, tp->tty_outcaller, + if(tp->tty_outrepcode == TTY_REVIVE) { + notify(tp->tty_outcaller); + tp->tty_outrevived = 1; + } else { + tty_reply(tp->tty_outrepcode, tp->tty_outcaller, tp->tty_outproc, tp->tty_outcum); - tp->tty_outcum = 0; + tp->tty_outcum = 0; + } } } if (tp->tty_outleft > 0 && tp->tty_termios.c_ospeed == B0) { /* Oops, the line has hung up. */ - tty_reply(tp->tty_outrepcode, tp->tty_outcaller, tp->tty_outproc, EIO); - tp->tty_outleft = tp->tty_outcum = 0; + if(tp->tty_outrepcode == TTY_REVIVE) { + notify(tp->tty_outcaller); + tp->tty_outrevived = 1; + } else { + tty_reply(tp->tty_outrepcode, tp->tty_outcaller, + tp->tty_outproc, EIO); + tp->tty_outleft = tp->tty_outcum = 0; + } } return 1;