lkml.org 
[lkml]   [2013]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/14] tools lib traceevent: Get rid of malloc_or_die() in show_error()
On Tue, 10 Dec 2013 11:03:44 +0900
Namhyung Kim <namhyung@kernel.org> 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

?

-- Steve


\
 
 \ /
  Last update: 2013-12-10 03:41    [W:0.103 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site