ftrace: fix trace_output
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> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
55922173f1
commit
6c1a99afbd
@ -45,14 +45,14 @@ trace_nop_print(struct trace_seq *s, struct trace_entry *entry, int flags);
|
||||
#define SEQ_PUT_FIELD_RET(s, x) \
|
||||
do { \
|
||||
if (!trace_seq_putmem(s, &(x), sizeof(x))) \
|
||||
return 0; \
|
||||
return TRACE_TYPE_PARTIAL_LINE; \
|
||||
} while (0)
|
||||
|
||||
#define SEQ_PUT_HEX_FIELD_RET(s, x) \
|
||||
do { \
|
||||
BUILD_BUG_ON(sizeof(x) > MAX_MEMHEX_BYTES); \
|
||||
if (!trace_seq_putmem_hex(s, &(x), sizeof(x))) \
|
||||
return 0; \
|
||||
return TRACE_TYPE_PARTIAL_LINE; \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user