[PATCH] Fix for getty console stair stepping

Rob Landley rob at landley.net
Wed Aug 23 21:14:28 UTC 2006


On Wednesday 23 August 2006 11:40 am, Antti Seppälä wrote:
> Hello.
> 
> Current busybox getty sets all termios modes to zero in function
> termio_init.

Isn't it supposed to?  (Susv3 hasn't got getty.)

> This has the effect of treating newlines as plain newlines instead of NL
> + CR which causes console output to be stair-stepped while getty is
> waiting for login.
> 
> If I boot my busybox and use another login (via ssh for example) and do:
> 
> ~ # echo step > /dev/console
> ~ # echo step > /dev/console
> ~ # echo step > /dev/console
> ~ # echo step > /dev/console
> ~ # echo step > /dev/console
> ~ #
> 
> 
> I get on the console:
> 
> busybox login: step
>                    step
>                        step
>                            step
>                                step

I fired up ubuntu and did "echo blah > /dev/tty1" from tty2, and got a similar 
stair-step.  This seems to be reasonably expectable behavior.
 
> The included patch fixes this by leaving OPOST and ONLCR alone when
> clearing c_oflag in termio_init.
> 
> What do you think, is this the right approach to fixing this?

Copying the same big assignment line into both the if and the else cases is 
unnecessary bloat, and if ONCLR was set but OPOST was off, this will set 
OPOST.

What actual problem are you trying to solve?

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list