Messages in this thread | | | Date | Tue, 6 Oct 2009 13:12:30 +0100 | From | Alan Cox <> | Subject | Re: TTY loosing bytes ? |
| |
> why doesn't receive_buf() return the amount of bytes actually received ?
You'd have to ask whoever wrote the code in 199something.
> I see flush_to_ldisc() believes it can flush everything before even > calling receive_buf() then it will never act on the possibility of > receive_buf() not being able to receive the entire data.
The ldisc is responsible for maintaining tty->receive_room correctly at all times.
> Am I right ? Should receive_buf() return the amount of bytes actually > received ? Also, why isn't receive_room enough to be sure there's > enough space to really receive that block of data ?
I've not seen this reported elsewhere so I assume you are somehow tripping a bug in the n_tty ldisc code. The other possibility is that you are in canonical mode and some of your input is intentionally discarded by the ldisc either as errors, overruns or through things like quoting or flow control.
| |