Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Josh Poimboeuf and committed by
Arnaldo Carvalho de Melo
408cf34c 5feaac24

+9 -18
+9 -9
tools/perf/util/parse-options.c
··· 360 360 } 361 361 } 362 362 363 - void parse_options_start(struct parse_opt_ctx_t *ctx, 364 - int argc, const char **argv, int flags) 363 + static void parse_options_start(struct parse_opt_ctx_t *ctx, 364 + int argc, const char **argv, int flags) 365 365 { 366 366 memset(ctx, 0, sizeof(*ctx)); 367 367 ctx->argc = argc - 1; ··· 378 378 const struct option *, int, 379 379 struct parse_opt_ctx_t *); 380 380 381 - int parse_options_step(struct parse_opt_ctx_t *ctx, 382 - const struct option *options, 383 - const char * const usagestr[]) 381 + static int parse_options_step(struct parse_opt_ctx_t *ctx, 382 + const struct option *options, 383 + const char * const usagestr[]) 384 384 { 385 385 int internal_help = !(ctx->flags & PARSE_OPT_NO_INTERNAL_HELP); 386 386 int excl_short_opt = 1; ··· 489 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 494 memmove(ctx->out + ctx->cpidx, ctx->argv, ctx->argc * sizeof(*ctx->out)); 495 495 ctx->out[ctx->cpidx + ctx->argc] = NULL; ··· 717 717 return false; 718 718 } 719 719 720 - int usage_with_options_internal(const char * const *usagestr, 721 - const struct option *opts, int full, 722 - struct parse_opt_ctx_t *ctx) 720 + static int usage_with_options_internal(const char * const *usagestr, 721 + const struct option *opts, int full, 722 + struct parse_opt_ctx_t *ctx) 723 723 { 724 724 struct option *ordered; 725 725
-9
tools/perf/util/parse-options.h
··· 195 195 const char *optstr, 196 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 199 /*----- some often used options -----*/ 209 200 extern int parse_opt_abbrev_cb(const struct option *, const char *, int);