]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add full state to trace_seq
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 25 Nov 2009 15:10:14 +0000 (16:10 +0100)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 9 Dec 2009 19:05:49 +0000 (14:05 -0500)
commitc1a62d7a699e85d142c68934600307ca41d859ae
treeca3fc8371382ce8dbe43eb684313847b7555573e
parent2e6c2da48e6c7a07344182593826651af2b40172
tracing: Add full state to trace_seq

The trace_seq buffer might fill up, and right now one needs to check the
return value of each printf into the buffer to check for that.

Instead, have the buffer keep track of whether it is full or not, and
reject more input if it is full or would have overflowed with an input
that wasn't added.

Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/trace_seq.h
kernel/trace/trace_output.c