Re: [RFC Patch 1/1] debugfs_printk and debugfs_dump interface

From: Randy Dunlap
Date: Tue Apr 22 2008 - 11:02:10 EST


K. Prasad wrote:

This patch introduces two new interfaces called debugfs_printk and debugfs_dump which can be used to print to the debugfs mount directly.
It uses the 'trace' infrastructure underneath and is a patch over it.
A sample file is also created to demonstrate its ease of use.

Signed-off-by: K.Prasad <prasad@xxxxxxxxxxxxxxxxxx>
---
Documentation/trace.txt | 21 ++++
include/linux/trace.h | 55 +++++++++++
lib/trace.c | 193 +++++++++++++++++++++++++++++++++++++++--
samples/trace/Makefile | 2 samples/trace/fork_new_trace.c | 97 ++++++++++++++++++++
5 files changed, 362 insertions(+), 6 deletions(-)

+
+/**
+ * debugfs_printk - Output binary into debugfs mount 'directly' using 'trace'

Oops. This is the debugfs_dump() function.

Otherwise it looks good. Thanks.

+ * @dpk: Structure containing info such as parent_dir and directory
+ * @output: Data that needs to be output
+ * @output_len: Length of the output data
+ */
+int debugfs_dump(struct debugfs_printk_data *dpk, const void *output,
+ const int output_len)
+{


--
~Randy
--
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/