diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-01-20 15:43:38 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-01-20 16:48:49 -0800 |
commit | d7fe75cbc23c7d225eee2ef04def239b6603dce7 (patch) | |
tree | 65456a12f4b83aac3852431f167ee1466a024097 /drivers/hwspinlock | |
parent | 15ea8ae8e03fdb845ed3ff5d9f11dd5f4f60252c (diff) | |
download | linux-stable-d7fe75cbc23c7d225eee2ef04def239b6603dce7.tar.gz linux-stable-d7fe75cbc23c7d225eee2ef04def239b6603dce7.tar.bz2 linux-stable-d7fe75cbc23c7d225eee2ef04def239b6603dce7.zip |
tty: teach the n_tty ICANON case about the new "cookie continuations" too
The ICANON case is a bit messy, since it has to look for the line
ending, and has special code to then suppress line ending characters if
they match the __DISABLED_CHAR. So it actually looks up the line ending
even past the point where it knows it won't copy it to the result
buffer.
That said, apart from all those odd legacy N_TTY ICANON cases, the
actual "should we continue copying" logic isn't really all that
complicated or different from the non-canon case. In fact, the lack of
"wait for at least N characters" arguably makes the repeat case slightly
simpler. It really just boils down to "there's more of the line to be
copied".
So add the necessarily trivial logic, and now the N_TTY case will give
long result lines even when in canon mode.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwspinlock')
0 files changed, 0 insertions, 0 deletions