WSL2-Linux-Kernel/tools/lib/subcmd
Arnaldo Carvalho de Melo b988971662 tools lib subcmd: Make it an error to pass a signed value to OPTION_UINTEGER
Options marked OPTION_UINTEGER or OPTION_U64 clearly indicates that an
unsigned value is expected, so just error out when a negative value is
passed, instead of returning something undesired to the tool.

E.g.:

  # perf bench futex hash -t -4
  # Running 'futex/hash' benchmark:
   Error: switch `t' expects an unsigned numerical value
   Usage: perf bench futex hash <options>

      -t, --threads <n>     Specify amount of threads
  #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2mdn8s2raatyhz7tamrsz22r@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-02-14 15:19:17 -03:00
..
Build
Makefile tools: Set the maximum optimization level according to the compiler being used 2017-02-14 10:55:27 -03:00
exec-cmd.c
exec-cmd.h tools subcmd: Rename subcmd header include guards 2015-12-17 14:27:14 -03:00
help.c
help.h tools subcmd: Rename subcmd header include guards 2015-12-17 14:27:14 -03:00
pager.c perf tools: Query terminal width and use in perf list 2016-10-03 21:35:45 -03:00
pager.h perf tools: Query terminal width and use in perf list 2016-10-03 21:35:45 -03:00
parse-options.c tools lib subcmd: Make it an error to pass a signed value to OPTION_UINTEGER 2017-02-14 15:19:17 -03:00
parse-options.h tools lib subcmd: Fix missing member name 2017-01-16 14:59:15 -03:00
run-command.c tools lib subcmd: Use str_error_r() 2016-07-12 15:20:30 -03:00
run-command.h tools subcmd: Rename subcmd header include guards 2015-12-17 14:27:14 -03:00
sigchain.c
sigchain.h tools subcmd: Rename subcmd header include guards 2015-12-17 14:27:14 -03:00
subcmd-config.c
subcmd-config.h
subcmd-util.h tools subcmd: Rename subcmd header include guards 2015-12-17 14:27:14 -03:00