diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2015-12-13 23:18:12 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-14 10:33:01 -0500 |
commit | 408cf34c176e1832bc2f9f68033a55a765484f93 (patch) | |
tree | fdcc0c428dbf0982b2617abf5db755ccbc70707d /tools/perf | |
parent | 5feaac248a46dd5f9876c4ae45c4bbbde5472e90 (diff) |
perf tools: Convert parse-options.c internal functions to static
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/c027b5f47ec1055077f5650edb1c7ad37c191e6c.1449965119.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/parse-options.c | 18 | ||||
-rw-r--r-- | tools/perf/util/parse-options.h | 9 |
2 files changed, 9 insertions, 18 deletions
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index de3290b47db1..14b2bee81e75 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c | |||
@@ -360,8 +360,8 @@ static void check_typos(const char *arg, const struct option *options) | |||
360 | } | 360 | } |
361 | } | 361 | } |
362 | 362 | ||
363 | void parse_options_start(struct parse_opt_ctx_t *ctx, | 363 | static void parse_options_start(struct parse_opt_ctx_t *ctx, |
364 | int argc, const char **argv, int flags) | 364 | int argc, const char **argv, int flags) |
365 | { | 365 | { |
366 | memset(ctx, 0, sizeof(*ctx)); | 366 | memset(ctx, 0, sizeof(*ctx)); |
367 | ctx->argc = argc - 1; | 367 | ctx->argc = argc - 1; |
@@ -378,9 +378,9 @@ static int usage_with_options_internal(const char * const *, | |||
378 | const struct option *, int, | 378 | const struct option *, int, |
379 | struct parse_opt_ctx_t *); | 379 | struct parse_opt_ctx_t *); |
380 | 380 | ||
381 | int parse_options_step(struct parse_opt_ctx_t *ctx, | 381 | static int parse_options_step(struct parse_opt_ctx_t *ctx, |
382 | const struct option *options, | 382 | const struct option *options, |
383 | const char * const usagestr[]) | 383 | const char * const usagestr[]) |
384 | { | 384 | { |
385 | int internal_help = !(ctx->flags & PARSE_OPT_NO_INTERNAL_HELP); | 385 | int internal_help = !(ctx->flags & PARSE_OPT_NO_INTERNAL_HELP); |
386 | int excl_short_opt = 1; | 386 | int excl_short_opt = 1; |
@@ -489,7 +489,7 @@ exclusive: | |||
489 | return PARSE_OPT_HELP; | 489 | return PARSE_OPT_HELP; |
490 | } | 490 | } |
491 | 491 | ||
492 | int parse_options_end(struct parse_opt_ctx_t *ctx) | 492 | static int parse_options_end(struct parse_opt_ctx_t *ctx) |
493 | { | 493 | { |
494 | memmove(ctx->out + ctx->cpidx, ctx->argv, ctx->argc * sizeof(*ctx->out)); | 494 | memmove(ctx->out + ctx->cpidx, ctx->argv, ctx->argc * sizeof(*ctx->out)); |
495 | ctx->out[ctx->cpidx + ctx->argc] = NULL; | 495 | ctx->out[ctx->cpidx + ctx->argc] = NULL; |
@@ -717,9 +717,9 @@ static bool option__in_argv(const struct option *opt, const struct parse_opt_ctx | |||
717 | return false; | 717 | return false; |
718 | } | 718 | } |
719 | 719 | ||
720 | int usage_with_options_internal(const char * const *usagestr, | 720 | static int usage_with_options_internal(const char * const *usagestr, |
721 | const struct option *opts, int full, | 721 | const struct option *opts, int full, |
722 | struct parse_opt_ctx_t *ctx) | 722 | struct parse_opt_ctx_t *ctx) |
723 | { | 723 | { |
724 | struct option *ordered; | 724 | struct option *ordered; |
725 | 725 | ||
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h index a8e407bc251e..dd1236d49903 100644 --- a/tools/perf/util/parse-options.h +++ b/tools/perf/util/parse-options.h | |||
@@ -195,15 +195,6 @@ extern int parse_options_usage(const char * const *usagestr, | |||
195 | const char *optstr, | 195 | const char *optstr, |
196 | bool short_opt); | 196 | bool short_opt); |
197 | 197 | ||
198 | extern void parse_options_start(struct parse_opt_ctx_t *ctx, | ||
199 | int argc, const char **argv, int flags); | ||
200 | |||
201 | extern int parse_options_step(struct parse_opt_ctx_t *ctx, | ||
202 | const struct option *options, | ||
203 | const char * const usagestr[]); | ||
204 | |||
205 | extern int parse_options_end(struct parse_opt_ctx_t *ctx); | ||
206 | |||
207 | 198 | ||
208 | /*----- some often used options -----*/ | 199 | /*----- some often used options -----*/ |
209 | extern int parse_opt_abbrev_cb(const struct option *, const char *, int); | 200 | extern int parse_opt_abbrev_cb(const struct option *, const char *, int); |