Re: TTY loosing bytes ?
From: Alan Cox
Date: Tue Oct 06 2009 - 08:13:13 EST
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/