diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-08-24 06:25:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-24 06:25:54 -0400 |
commit | 5f9ece02401116b29eb04396b99ea092acb75dd8 (patch) | |
tree | e10386e2dc63c275646b4eb0bed857da7bf86c6a /tools/perf/util/parse-options.c | |
parent | 9f51e24ee8b5a1595b6a5ac0c2be278a16488e75 (diff) | |
parent | 422bef879e84104fee6dc68ded0e371dbeb5f88e (diff) |
Merge commit 'v2.6.31-rc7' into x86/cleanups
Merge reason: we were on -rc1 before - go up to -rc7
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/parse-options.c')
-rw-r--r-- | tools/perf/util/parse-options.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index b3affb1658d2..1bf67190c820 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c | |||
@@ -20,7 +20,8 @@ static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, | |||
20 | if (p->opt) { | 20 | if (p->opt) { |
21 | *arg = p->opt; | 21 | *arg = p->opt; |
22 | p->opt = NULL; | 22 | p->opt = NULL; |
23 | } else if (p->argc == 1 && (opt->flags & PARSE_OPT_LASTARG_DEFAULT)) { | 23 | } else if ((opt->flags & PARSE_OPT_LASTARG_DEFAULT) && (p->argc == 1 || |
24 | **(p->argv + 1) == '-')) { | ||
24 | *arg = (const char *)opt->defval; | 25 | *arg = (const char *)opt->defval; |
25 | } else if (p->argc > 1) { | 26 | } else if (p->argc > 1) { |
26 | p->argc--; | 27 | p->argc--; |
@@ -485,7 +486,7 @@ int parse_options_usage(const char * const *usagestr, | |||
485 | } | 486 | } |
486 | 487 | ||
487 | 488 | ||
488 | int parse_opt_verbosity_cb(const struct option *opt, const char *arg, | 489 | int parse_opt_verbosity_cb(const struct option *opt, const char *arg __used, |
489 | int unset) | 490 | int unset) |
490 | { | 491 | { |
491 | int *target = opt->value; | 492 | int *target = opt->value; |