libsubcmd: add OPT_UINTEGER_OPTARG option type
authorRiccardo Mancini <rickyman7@gmail.com>
Sat, 21 Aug 2021 09:19:37 +0000 (11:19 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Aug 2021 18:44:05 +0000 (15:44 -0300)
commitb75f299d6960e773a28fcd38bad901998035e69e
treee412adf220e1549b025fd1c0b205f5dccb182006
parent40a72c6472c52ce765d5c57ab053083c8cbcc3c9
libsubcmd: add OPT_UINTEGER_OPTARG option type

This patch adds OPT_UINTEGER_OPTARG, which is the same as OPT_UINTEGER,
but also makes it possible to use the option without any value, setting
the variable to a default value, d.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/c46749b3dff796729078352ff164d363457a3587.1629490974.git.rickyman7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/subcmd/parse-options.h