Re: [PATCH 01/14] tools lib traceevent: Get rid of malloc_or_die() in show_error()

From: Namhyung Kim
Date: Tue Dec 10 2013 - 00:01:52 EST


On Mon, 9 Dec 2013 21:14:10 -0500, Steven Rostedt wrote:
> On Tue, 10 Dec 2013 11:03:44 +0900
> Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
>> What about returning error code rather than string? This way we won't
>> worry about the allocation of the error string itself.
>>
>> But the downside of it is loosing a positional info of the error.
>> Hmm.. what about using a static buffer in pevent for it then?
>
> A static buffer may be the solution. Never need to worry about
> allocating it on error, as it will already be allocated. And we can add
> APIs to print it nicely.
>
> Perhaps call it
>
> pevent->filter_error_buffer
>
> ?

Okay, I'll go with this.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/