Re: [PATCH] script: abort if unused arguments are given

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

 



On Fri, Nov 18, 2022 at 01:23:37PM +0000, Chris Hofstaedtler wrote:
>  term-utils/script.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)

Applied.

> +	if (argc > 0) {
> +		/* only one filename is accepted. if --log-out was given,
> +		 * freestanding filename is ignored */
> +		usage();
> +	}

We do not use usage() in this case, but errtryhelp() to get

        $ script aaa bbb
        script: unexpected number of arguments
        Try 'script --help' for more information.

Fixed. Thanks.

    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