summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/strbuf.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-10-24 17:49:27 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-27 13:28:44 +0100
commitc71183697250b356be6c7c1abc2e9a74073e1dca (patch)
tree704044c1c38f9f0da738712b807fb01f201d3e59 /tools/perf/util/strbuf.h
parentperf tools: Setup pager when printing usage and help (diff)
downloadlinux-c71183697250b356be6c7c1abc2e9a74073e1dca.tar.xz
linux-c71183697250b356be6c7c1abc2e9a74073e1dca.zip
perf tools: Introduce usage_with_options_msg()
Now usage_with_options() setup a pager before printing message so normal printf() or pr_err() will not be shown. The usage_with_options_msg() can be used to print some help message before usage strings. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1445701767-12731-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/strbuf.h')
-rw-r--r--tools/perf/util/strbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/strbuf.h b/tools/perf/util/strbuf.h
index 436ac319f6c7..529f2f035249 100644
--- a/tools/perf/util/strbuf.h
+++ b/tools/perf/util/strbuf.h
@@ -39,6 +39,7 @@
*/
#include <assert.h>
+#include <stdarg.h>
extern char strbuf_slopbuf[];
struct strbuf {
@@ -85,6 +86,7 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s) {
__attribute__((format(printf,2,3)))
extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
+extern void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap);
/* XXX: if read fails, any partial read is undone */
extern ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint);