[PATCH v3 3/9] argparse: allow user-override of help printing
David Marchand
david.marchand at redhat.com
Mon Jul 21 10:43:05 CEST 2025
On Fri, Jul 18, 2025 at 4:34 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
> diff --git a/lib/argparse/rte_argparse.c b/lib/argparse/rte_argparse.c
> index d3b32c6357..e7b9bf573d 100644
> --- a/lib/argparse/rte_argparse.c
> +++ b/lib/argparse/rte_argparse.c
> @@ -821,7 +821,10 @@ rte_argparse_parse(const struct rte_argparse *obj, int argc, char **argv)
> goto error;
>
> if (show_help) {
> - rte_argparse_print_help(stdout, obj);
> + if (obj->print_help != NULL)
> + obj->print_help(obj);
Should we pass a stream to the callback?
> + else
> + rte_argparse_print_help(stdout, obj);
> exit(0);
> }
>
--
David Marchand
More information about the dev
mailing list