tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprint...
authorTzvetomir Stoyanov <tstoyanov@vmware.com>
Sat, 1 Dec 2018 04:08:10 +0000 (23:08 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 8 Jan 2019 16:28:13 +0000 (13:28 -0300)
commit6d2d6fd7e3ee0daf0d8308741792b3ec41aafd0c
tree0cd6ace0970c8a4b818c1a8586d37c013d3e5b69
parent2e4318a287bdf815140462257ab8697f5289a12f
tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprintf() APIs

In order to make libtraceevent into a proper library, its API should be
straightforward.

The trace_seq_printf() and trace_seq_vprintf() APIs have inconsistent
returned values with the other trace_seq_* APIs.

This path changes the return logic of trace_seq_printf() and
trace_seq_vprintf() to return the number of printed characters, as the
other trace_seq_* related APIs.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181201040852.485792891@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/trace-seq.c