Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293446
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/10] perf tools: Document the fact that parse_options*() may exit |
| Date | Thu, 17 Dec 2015 01:50:03 +0100 |
| Message-ID | <qGuVB-Ae-41@gated-at.bofh.it> (permalink) |
| References | <qGuVA-Ae-11@gated-at.bofh.it> |
| X-Original-To | Ingo Molnar <mingo@kernel.org> |
| X-Mailer | git-send-email 2.1.0 |
| X-Srs-Rewrite | SMTP reverse-path rewritten from <acme@infradead.org> by casper.infradead.org See http://www.infradead.org/rpr.html |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 38 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Josh Poimboeuf <jpoimboe@redhat.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Arnaldo Carvalho de Melo <acme@redhat.com> |
| X-Original-Date | Wed, 16 Dec 2015 21:47:57 -0300 |
| X-Original-Message-ID | <1450313283-25348-5-git-send-email-acme@kernel.org> |
| X-Original-References | <1450313283-25348-1-git-send-email-acme@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1293446 |
Show key headers only | View raw
From: Josh Poimboeuf <jpoimboe@redhat.com>
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>
---
tools/perf/util/parse-options.h | 3 +++
1 file changed, 3 insertions(+)
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 {
/* parse_options() will filter out the processed options and leave the
* non-option argments in argv[].
* Returns the number of arguments left in argv[].
+ *
+ * NOTE: parse_options() and parse_options_subcommand() may call exit() in the
+ * case of an error (or for 'special' options like --list-cmds or --list-opts).
*/
extern int parse_options(int argc, const char **argv,
const struct option *options,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 04/10] perf tools: Document the fact that parse_options*() may exit Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 01:50 +0100
csiph-web