diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:22:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:22:43 -0400 |
commit | 4f0ac854167846bd55cd81dbc9a36e03708aa01c (patch) | |
tree | 0eb34d18a667f8e68ad9255f791560b028fed2a6 /tools/perf/util/parse-options.c | |
parent | b9356c53ba2f593081e5aa45eb67adcce243d1c0 (diff) | |
parent | 6b58e7f146f8d79c08f62087f928e1f01747de71 (diff) |
Merge branch 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
perf tools: Avoid unnecessary work in directory lookups
perf stat: Clean up statistics calculations a bit more
perf stat: More advanced variance computation
perf stat: Use stddev_mean in stead of stddev
perf stat: Remove the limit on repeat
perf stat: Change noise calculation to use stddev
x86, perf_counter, bts: Do not allow kernel BTS tracing for now
x86, perf_counter, bts: Correct pointer-to-u64 casts
x86, perf_counter, bts: Fail if BTS is not available
perf_counter: Fix output-sharing error path
perf trace: Fix read_string()
perf trace: Print out in nanoseconds
perf tools: Seek to the end of the header area
perf trace: Fix parsing of perf.data
perf trace: Sample timestamps as well
perf_counter: Introduce new (non-)paranoia level to allow raw tracepoint access
perf trace: Sample the CPU too
perf tools: Work around strict aliasing related warnings
perf tools: Clean up warnings list in the Makefile
perf tools: Complete support for dynamic strings
...
Diffstat (limited to 'tools/perf/util/parse-options.c')
-rw-r--r-- | tools/perf/util/parse-options.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index 1bf67190c820..6d8af48c925e 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c | |||
@@ -53,6 +53,12 @@ static int get_value(struct parse_opt_ctx_t *p, | |||
53 | case OPTION_SET_INT: | 53 | case OPTION_SET_INT: |
54 | case OPTION_SET_PTR: | 54 | case OPTION_SET_PTR: |
55 | return opterror(opt, "takes no value", flags); | 55 | return opterror(opt, "takes no value", flags); |
56 | case OPTION_END: | ||
57 | case OPTION_ARGUMENT: | ||
58 | case OPTION_GROUP: | ||
59 | case OPTION_STRING: | ||
60 | case OPTION_INTEGER: | ||
61 | case OPTION_LONG: | ||
56 | default: | 62 | default: |
57 | break; | 63 | break; |
58 | } | 64 | } |
@@ -130,6 +136,9 @@ static int get_value(struct parse_opt_ctx_t *p, | |||
130 | return opterror(opt, "expects a numerical value", flags); | 136 | return opterror(opt, "expects a numerical value", flags); |
131 | return 0; | 137 | return 0; |
132 | 138 | ||
139 | case OPTION_END: | ||
140 | case OPTION_ARGUMENT: | ||
141 | case OPTION_GROUP: | ||
133 | default: | 142 | default: |
134 | die("should not happen, someone must be hit on the forehead"); | 143 | die("should not happen, someone must be hit on the forehead"); |
135 | } | 144 | } |
@@ -296,6 +305,8 @@ int parse_options_step(struct parse_opt_ctx_t *ctx, | |||
296 | return parse_options_usage(usagestr, options); | 305 | return parse_options_usage(usagestr, options); |
297 | case -2: | 306 | case -2: |
298 | goto unknown; | 307 | goto unknown; |
308 | default: | ||
309 | break; | ||
299 | } | 310 | } |
300 | if (ctx->opt) | 311 | if (ctx->opt) |
301 | check_typos(arg + 1, options); | 312 | check_typos(arg + 1, options); |
@@ -314,6 +325,8 @@ int parse_options_step(struct parse_opt_ctx_t *ctx, | |||
314 | ctx->argv[0] = strdup(ctx->opt - 1); | 325 | ctx->argv[0] = strdup(ctx->opt - 1); |
315 | *(char *)ctx->argv[0] = '-'; | 326 | *(char *)ctx->argv[0] = '-'; |
316 | goto unknown; | 327 | goto unknown; |
328 | default: | ||
329 | break; | ||
317 | } | 330 | } |
318 | } | 331 | } |
319 | continue; | 332 | continue; |
@@ -336,6 +349,8 @@ int parse_options_step(struct parse_opt_ctx_t *ctx, | |||
336 | return parse_options_usage(usagestr, options); | 349 | return parse_options_usage(usagestr, options); |
337 | case -2: | 350 | case -2: |
338 | goto unknown; | 351 | goto unknown; |
352 | default: | ||
353 | break; | ||
339 | } | 354 | } |
340 | continue; | 355 | continue; |
341 | unknown: | 356 | unknown: |
@@ -456,6 +471,13 @@ int usage_with_options_internal(const char * const *usagestr, | |||
456 | } | 471 | } |
457 | break; | 472 | break; |
458 | default: /* OPTION_{BIT,BOOLEAN,SET_INT,SET_PTR} */ | 473 | default: /* OPTION_{BIT,BOOLEAN,SET_INT,SET_PTR} */ |
474 | case OPTION_END: | ||
475 | case OPTION_GROUP: | ||
476 | case OPTION_BIT: | ||
477 | case OPTION_BOOLEAN: | ||
478 | case OPTION_SET_INT: | ||
479 | case OPTION_SET_PTR: | ||
480 | case OPTION_LONG: | ||
459 | break; | 481 | break; |
460 | } | 482 | } |
461 | 483 | ||