lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] ftrace: fix trace_output
    On Thu, 15 Jan 2009 19:40:51 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:

    > From: Lai Jiangshan <laijs@cn.fujitsu.com>
    >
    > Impact: fix bug for handling partial line
    >
    > trace_seq_printf(), seq_print_userip_objs(), ... return
    > 0 -- partial line was written
    > other(>0) -- success
    >
    > duplicate output is also removed in trace_print_raw().
    >
    > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    > Signed-off-by: Steven Rostedt <srostedt@redhat.com>
    > ---
    > kernel/trace/trace_output.c | 65 ++++++++++++++++++++----------------------
    > kernel/trace/trace_output.h | 4 +-
    > 2 files changed, 33 insertions(+), 36 deletions(-)
    >
    > diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
    > index df0c25c..4e3ad36 100644
    > --- a/kernel/trace/trace_output.c
    > +++ b/kernel/trace/trace_output.c
    > @@ -440,9 +440,9 @@ trace_fn_raw(struct trace_seq *s, struct trace_entry *entry, int flags)
    >
    > trace_assign_type(field, entry);
    >
    > - if (trace_seq_printf(s, "%x %x\n",
    > - field->ip,
    > - field->parent_ip))
    > + if (!trace_seq_printf(s, "%x %x\n",

    "%lx %lx", surely?

    If trace_seq_printf() had the attribute(printf) thing, it would have warned.




    \
     
     \ /
      Last update: 2009-01-16 02:43    [W:4.277 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site