[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] tr: display usage for incorrect arguments
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2023-04-16 15:55:03
Message-ID: CAK1hOcObxUj3EaXp5_k-mWYpUFKnsFtgNqnuthZgA8khCNZR8A () mail ! gmail ! com
[Download RAW message or body]
Applied, thank you.
On Sun, Apr 16, 2023 at 9:24 AM Ron Yorston <rmy@pobox.com> wrote:
>
> tr must have one or two non-option arguments. Display the usage
> message if any other number is present.
>
> function old new delta
> .rodata 108389 108392 +3
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 1/0 up/down: 3/0) Total: 3 bytes
>
> Signed-off-by: Ron Yorston <rmy@pobox.com>
> ---
> coreutils/tr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/coreutils/tr.c b/coreutils/tr.c
> index 1e402dfdb..7fe7f89d5 100644
> --- a/coreutils/tr.c
> +++ b/coreutils/tr.c
> @@ -299,7 +299,7 @@ int tr_main(int argc UNUSED_PARAM, char **argv)
> */
>
> /* '+': stop at first non-option */
> - opts = getopt32(argv, "^+" "Ccds" "\0" "-1");
> + opts = getopt32(argv, "^+" "Ccds" "\0" "-1:?2");
> argv += optind;
>
> str1_length = expand(*argv++, &str1);
> --
> 2.39.2
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic