aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/ui/helpline.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-11-15 01:47:41 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-12-09 08:46:04 -0300
commitb56e53312d445967f6bdb91e5667c56755e47450 (patch)
treecae6efaf823d34b6c01d71572d0cb0e08a640d47 /tools/perf/ui/helpline.c
parentperf ui: Always compile error printing code (diff)
downloadwireguard-linux-b56e53312d445967f6bdb91e5667c56755e47450.tar.xz
wireguard-linux-b56e53312d445967f6bdb91e5667c56755e47450.zip
perf ui/helpline: Introduce ui_helpline__vshow()
The ui_helpline__vshow() will be used for pr_* functions. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1352911664-24620-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/helpline.c')
-rw-r--r--tools/perf/ui/helpline.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/ui/helpline.c b/tools/perf/ui/helpline.c
index a49bcf3c190b..700fb3cfa1c7 100644
--- a/tools/perf/ui/helpline.c
+++ b/tools/perf/ui/helpline.c
@@ -16,9 +16,16 @@ static void nop_helpline__push(const char *msg __maybe_unused)
{
}
+static int nop_helpline__show(const char *fmt __maybe_unused,
+ va_list ap __maybe_unused)
+{
+ return 0;
+}
+
static struct ui_helpline default_helpline_fns = {
.pop = nop_helpline__pop,
.push = nop_helpline__push,
+ .show = nop_helpline__show,
};
struct ui_helpline *helpline_fns = &default_helpline_fns;
@@ -59,3 +66,8 @@ void ui_helpline__puts(const char *msg)
ui_helpline__pop();
ui_helpline__push(msg);
}
+
+int ui_helpline__vshow(const char *fmt, va_list ap)
+{
+ return helpline_fns->show(fmt, ap);
+}