|
@@ -1762,7 +1762,7 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
|
|
|
{
|
|
|
struct n_tty_data *ldata = tty->disc_data;
|
|
|
|
|
|
- if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) {
|
|
|
+ if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) {
|
|
|
bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE);
|
|
|
ldata->line_start = ldata->read_tail;
|
|
|
if (!L_ICANON(tty) || !read_cnt(ldata)) {
|
|
@@ -2425,7 +2425,7 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file,
|
|
|
return put_user(tty_chars_in_buffer(tty), (int __user *) arg);
|
|
|
case TIOCINQ:
|
|
|
down_write(&tty->termios_rwsem);
|
|
|
- if (L_ICANON(tty))
|
|
|
+ if (L_ICANON(tty) && !L_EXTPROC(tty))
|
|
|
retval = inq_canon(ldata);
|
|
|
else
|
|
|
retval = read_cnt(ldata);
|