[SLOF] [PATCH] slof/fs/accept: Allow Unix LF line endings, too

Segher Boessenkool segher at kernel.crashing.org
Wed Sep 1 03:35:40 AEST 2021

On Tue, Aug 31, 2021 at 04:21:37PM +1000, Alexey Kardashevskiy wrote:
> >>>For your UNIX program, try using  stty raw  (or anything else that 
> >>>turns
> >>>off icrnl -- the emulated UNIX terminal uses CR when you press return,
> >>>it is the line discipline that turns it into a LF).
> >>
> >>"stty raw" makes "read" return ^M"\r". _Now_ I am truly confused 
> >>although this behavior explains why QEMU works.
> >
> >I haven't looked very close, but I think QEMU is likely using 
> >cfmakeraw() on stdio by default - which then disables the INLCR bit.
> QEMU does disable everything including INCLR, literally sets flags o 0 
> which is pretty much what "stty raw" does. But I'd think that not having 
> INCLR won't produce ^M"\r".


The return key should produce hex 0d (CR).  If icrnl is on that is
transformed into hex 0a (LF) (by the kernel, in the terminal line disc).


More information about the SLOF mailing list