cli: use argpar for parsing run command's arguments
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 26 Jul 2019 21:20:08 +0000 (17:20 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 2 Aug 2019 15:46:54 +0000 (11:46 -0400)
commit976b24cfd2f02ac23b2aff9a5b304e947f8a98a6
tree45b00763695409d327f5453b6885653c492b60df
parent0e497e1c06d5f6bee949b064a14d108aed460cb8
cli: use argpar for parsing run command's arguments

A non-obvious change is the handling of the --retry-duration value.
Before this patch, it was automatically converted to a long by popt.  We
now call g_ascii_strtoll and validate that it's parsable as an integer.

Also, introduce the help_option_is_specified function (which will be
used for other sub-commands as well).  The goal is to check for --help
before everything else, such that doing:

    $ babeltrace2 run hello --help

prints the help, rather than saying "Unexpected parameter `hello`".

Change-Id: Ib6873a2e2183e73f340cf25026924df298c8c1e9
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1790
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cli/babeltrace2-cfg-cli-args.c
This page took 0.024041 seconds and 4 git commands to generate.