diff options
Diffstat (limited to 'include/linux/tty_flip.h')
-rw-r--r-- | include/linux/tty_flip.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 3f821e98af0f..c28dd523f96e 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -17,8 +17,12 @@ static inline int tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag) { struct tty_buffer *tb = port->buf.tail; - if (tb && tb->used < tb->size) { - *flag_buf_ptr(tb, tb->used) = flag; + int change; + + change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL); + if (!change && tb->used < tb->size) { + if (~tb->flags & TTYB_NORMAL) + *flag_buf_ptr(tb, tb->used) = flag; *char_buf_ptr(tb, tb->used++) = ch; return 1; } |