Re: [Toybox] microcom.c discarding data due to TCSAFLUSH

2024-05-23 Thread Yi-Yo Chiang via Toybox
On Fri, May 24, 2024 at 12:11 AM Rob Landley wrote: > On 5/20/24 09:42, Yi-Yo Chiang via Toybox wrote: > > Is there any particular reason to use TCSAFLUSH here? > > Partly because it's what strace said busybox and minicom were doing, and > partly > because I've had serial hardware that produced

Re: [Toybox] microcom.c discarding data due to TCSAFLUSH

2024-05-23 Thread Rob Landley
On 5/20/24 09:42, Yi-Yo Chiang via Toybox wrote: > Is there any particular reason to use TCSAFLUSH here? Partly because it's what strace said busybox and minicom were doing, and partly because I've had serial hardware that produced initial static on more than one occasion. In this case, it looks

Re: [Toybox] microcom.c discarding data due to TCSAFLUSH

2024-05-20 Thread enh via Toybox
On Mon, May 20, 2024 at 10:43 AM Yi-Yo Chiang wrote: > > Found this out today when comparing captured logs. Every time I connect to a > pty the first few hundreds of bytes seem to always be missing. > I then traced to this line >

[Toybox] microcom.c discarding data due to TCSAFLUSH

2024-05-20 Thread Yi-Yo Chiang via Toybox
Found this out today when comparing captured logs. Every time I connect to a pty the first few hundreds of bytes seem to always be missing. I then traced to this line https://github.com/landley/toybox/blob/master/toys/net/microcom.c#L103 and it's the tcsetattr(TCSAFLUSH) that is discarding