Messages in this thread | | | Date | Wed, 16 Jun 2004 23:17:17 +0200 (CEST) | From | Egmont Koblinger <> | Subject | Re: Linux 2.6.7 (stty rows 50 columns 140 reports : No such device or address) |
| |
On Wed, 16 Jun 2004 jsimmons@pentafluge.infradead.org wrote:
Hi,
> +#ifdef TIOCGWINSZ > + int size_was_set = 0; > + int cols, rows; ^^^^^^^^^^^^^^^ These should both be initialized to -1 because...
> - set_window_size ((int) integer_arg (argv[k]), -1, > - fd, device_name); > + rows = integer_arg (argv[k]); > + size_was_set = 1;
[...]
> - set_window_size (-1, (int) integer_arg (argv[k]), > - fd, device_name); > + cols = integer_arg (argv[k]); > + size_was_set = 1;
...here maybe only one of them is set, but...
> + if (size_was_set) > + { > + set_window_size (rows, cols, fd, device_name);
...here both of them are used. Looking at the body of size_was_set() and the code that was removed from stty it's clear that -1 means don't change, while 0 means change to 0.
-- Egmont - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |