Re: [PATCH] agetty: don't put the VC into canonical mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 24, 2018 at 12:15:35PM +0200, Lubomir Rintel wrote:
> -	if ((options.flags & F_VCONSOLE) == 0) {
> -		/* Finalize the termios settings. */
> +	/* Finalize the termios settings. */
> +	if ((options.flags & F_VCONSOLE) == 0)
> +		reset_vc(&options, &termios, 1);
> +	else
>  		termio_final(&options, &termios, &chardata);

This completely changes logic of the code and removes termio_final()
from serial-line code path. Is it expected change? I don't think so.

> -		/* Now the newline character should be properly written. */
> -		write_all(STDOUT_FILENO, "\r\n", 2);
> -	}
> +	/* Now the newline character should be properly written. */
> +	write_all(STDOUT_FILENO, "\r\n", 2);

Why we need to always write \r\n ?

Maybe all you need is

    if ((options.flags & F_VCONSOLE) == 0) {
        termio_final(&options, &termios, &chardata);
        write_all(STDOUT_FILENO, "\r\n", 2);
    } else
        reset_vc(&options, &termios, 1);


  Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux