mirror of
https://github.com/opnsense/src.git
synced 2026-03-17 08:02:24 -04:00
Replace previous fix with less agressive, just return EIO
if ttywait can't drain queue.
This commit is contained in:
parent
c5c8ff8669
commit
dee8849b8d
1 changed files with 6 additions and 7 deletions
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.c 8.8 (Berkeley) 1/21/94
|
||||
* $Id: tty.c,v 1.21 1995/02/09 11:13:30 jkh Exp $
|
||||
* $Id: tty.c,v 1.22 1995/02/12 23:01:13 ache Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -1005,15 +1005,14 @@ ttywait(tp)
|
|||
break;
|
||||
}
|
||||
}
|
||||
/* If some output still there, kill it */
|
||||
if (tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY))
|
||||
ttyflush(tp, FWRITE);
|
||||
if (!error && (tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)))
|
||||
error = EIO;
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush after waiting.
|
||||
* Flush if successfully wait.
|
||||
*/
|
||||
int
|
||||
ttywflush(tp)
|
||||
|
|
@ -1021,8 +1020,8 @@ ttywflush(tp)
|
|||
{
|
||||
int error;
|
||||
|
||||
error = ttywait(tp);
|
||||
ttyflush(tp, FREAD);
|
||||
if ((error = ttywait(tp)) == 0)
|
||||
ttyflush(tp, FREAD);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue