aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2015-12-15 10:39:34 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-12-16 14:16:49 -0500
commit24a88bdd05d5de32f3a56a4dcc5070c97d4a514f (patch)
tree59e0f3d5d3a829e415b22d9a5ab7ab0df42ed104 /tools
parentce99091730c92bf560712baa0696ea5a461b1fe8 (diff)
perf tools: Document the fact that parse_options*() may exit
Generally, calling exit() from a library is bad practice. Eventually these functions might be redesigned so that they don't exit. For now, just document the fact that they do. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/97b1af06cc3b18dd0f49e655d6d659eaa64ecde5.1450193761.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-options.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h
index 1231960d6148..d1544069c7c0 100644
--- a/tools/perf/util/parse-options.h
+++ b/tools/perf/util/parse-options.h
@@ -152,6 +152,9 @@ struct option {
152/* parse_options() will filter out the processed options and leave the 152/* parse_options() will filter out the processed options and leave the
153 * non-option argments in argv[]. 153 * non-option argments in argv[].
154 * Returns the number of arguments left in argv[]. 154 * Returns the number of arguments left in argv[].
155 *
156 * NOTE: parse_options() and parse_options_subcommand() may call exit() in the
157 * case of an error (or for 'special' options like --list-cmds or --list-opts).
155 */ 158 */
156extern int parse_options(int argc, const char **argv, 159extern int parse_options(int argc, const char **argv,
157 const struct option *options, 160 const struct option *options,