Re: [PATCH 2/4] tools lib traceevent: Add options to plugins

Namhyung Kim
2014-05-20T02:15:35Z

On Tue, May 20, 2014 at 2:06 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 2014-05-19 at 23:29 +0900, Namhyung Kim wrote:
>> 2014-05-16 (금), 10:02 -0400, Steven Rostedt:

>> > -struct plugin_option {
>> > - struct plugin_option *next;
>> > +struct pevent_plugin_option {
>> > + struct pevent_plugin_option *next;
>>
>> Hmm.. this name change reminds me that it might be better if this plugin
>> and option list belong to a pevent..
>
> Yeah, eventually, but for now I want to try to sync what I have in
> trace-cmd with what is here in libtraceevent. At least to save history.
> Then we can modify it to be per pevent. For now, there's no users that
> need it per pevent. But that should definitely be changed before we push
> this out to distros.

Okay.

[SNIP]
>> > + free(name);
>> > + goto err;
>> > + }
>> > + list[count++] = name;
>> > + list[count] = NULL;
>> > + }
>> > + }
>> > + if (!count)
>> > + return NULL;
>> > + return list;
>>
>> Isn't it enough to simply return the list?
>
> Confused. Do you mean "Is it enough to simply return the list?"

I mean that it seems the 'list' is always NULL if the count is zero.

> BTW, Are you at LinuxCon Japan?

Nope, I'll be at LPC instead. :)

Thanks,
Namhyung