Re: [REVIEW] move tty lock/initial up in the stack

From: Jilles Tjoelker <jilles_at_stack.nl>
Date: Sat, 19 Jun 2004 17:55:57 +0200
On Sat, Jun 19, 2004 at 10:15:58AM +0200, Poul-Henning Kamp wrote:
> It adds two new flags to stty(1): -i and -l to manipulate the initial
> and lock states and eliminates the tty[il]d# and cua[il]a# devices.

> Subsequently I would like to move the tty/cua split up as well.

> Index: bin/stty/stty.c
> ===================================================================
> RCS file: /home/ncvs/src/bin/stty/stty.c,v
> retrieving revision 1.22
> diff -u -r1.22 stty.c
> --- bin/stty/stty.c	6 Apr 2004 20:06:53 -0000	1.22
> +++ bin/stty/stty.c	18 Jun 2004 11:36:57 -0000
> _at__at_ -60,15 +60,17 _at__at_
...
>  	while (optind < argc &&
>  	    strspn(argv[optind], "-aefg") == strlen(argv[optind]) &&

This needs to be changed to "-aefgil". This is possible because there
are no arguments starting with "-" and containing only "[aefgil]" in the
rest.

(This also means you can't do "-f/dev/ttyxxx".)

> -	    (ch = getopt(argc, argv, "aef:g")) != -1)
> +	    (ch = getopt(argc, argv, "aef:gil")) != -1)
>  		switch(ch) {
>  		case 'a':		/* undocumented: POSIX compatibility */

Not really related, but stty -a has been properly documented for a long
time ;-)

-- 
Jilles Tjoelker
Received on Sat Jun 19 2004 - 13:56:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:58 UTC