Re: [PATCH v3 14/15] tools/lib/traceevent: Change description of few APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 Nov 2018 22:43:01 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> > index 7b26b9e3a4ba..aed098f29b66 100644
> > --- a/tools/lib/traceevent/event-parse.c
> > +++ b/tools/lib/traceevent/event-parse.c
> > @@ -6441,7 +6441,7 @@ int tep_get_any_field_val(struct trace_seq *s, struct tep_event *event,
> >   * @record: The record with the field name.
> >   * @err: print default error if failed.
> >   *
> > - * Returns: 0 on success, -1 field not found, or 1 if buffer is full.
> > + * Returns: 1 on success, -1 field not found, or 0 if buffer is full.  
> 
> Actually, it looks like it returns the length written on success.

And this actually changed by your update to trace_seq_printf() in patch
11.

Luckily, it appears that the only use cases just check for the -1. :-)

-- Steve

> 
> >   */
> >  int tep_print_num_field(struct trace_seq *s, const char *fmt,
> >  			struct tep_event *event, const char *name,
> > @@ -6473,7 +6473,7 @@ int tep_print_num_field(struct trace_seq *s, const char *fmt,
> >   * @record: The record with the field name.
> >   * @err: print default error if failed.
> >   *
> > - * Returns: 0 on success, -1 field not found, or 1 if buffer is full.
> > + * Returns: 1 on success, -1 field not found, or 0 if buffer is full.  
> 
> This too.



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux