ACK: [PATCH] lib: fwts_args: determine tty width from stdin
IvanHu
ivan.hu at canonical.com
Wed Feb 26 03:37:36 UTC 2014
On 02/12/2014 12:52 PM, Keng-Yu Lin wrote:
> Newer version of Automake redirects the stderr. So the tty winsize
> can't be determined as istty() failes.
>
> As we do not use fwts like `fwts < inputfile`, so it is safe to use
> the stdin for determining the tty winsize.
>
> Signed-off-by: Keng-Yu Lin <kengyu at canonical.com>
> ---
> src/lib/src/fwts_args.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_args.c b/src/lib/src/fwts_args.c
> index 631ba5f..19c7488 100644
> --- a/src/lib/src/fwts_args.c
> +++ b/src/lib/src/fwts_args.c
> @@ -264,7 +264,7 @@ void fwts_args_show_options(void)
>
> fwts_list_init(&sorted_options);
>
> - width = fwts_tty_width(fileno(stderr), FWTS_MIN_TTY_WIDTH);
> + width = fwts_tty_width(fileno(stdin), FWTS_MIN_TTY_WIDTH);
> if ((width - (FWTS_ARGS_WIDTH + 1)) < 0)
> width = FWTS_MIN_TTY_WIDTH;
>
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list