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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Aug 2019 18:05:20 +0000 (14:05 -0400)
commit9d1872e75e3a63d5410457c01d1260190133059d
tree76df80a9b067b47217c85c0f08663149e7543cc8
parent091cc3eb4a566c191327aad16c14d9526d752a40
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.025969 seconds and 4 git commands to generate.