[SCSI] ftrace: add __print_hex()
[deliverable/linux.git] / kernel / trace / trace_output.c
index 8e46b3323cdcdd91ad9833aa1eb8d0f1bf82f3af..7c4a0ca650b565004818d5ad08fc969711725eee 100644 (file)
@@ -355,6 +355,21 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
 }
 EXPORT_SYMBOL(ftrace_print_symbols_seq);
 
+const char *
+ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len)
+{
+       int i;
+       const char *ret = p->buffer + p->len;
+
+       for (i = 0; i < buf_len; i++)
+               trace_seq_printf(p, "%s%2.2x", i == 0 ? "" : " ", buf[i]);
+
+       trace_seq_putc(p, 0);
+
+       return ret;
+}
+EXPORT_SYMBOL(ftrace_print_hex_seq);
+
 #ifdef CONFIG_KRETPROBES
 static inline const char *kretprobed(const char *name)
 {
This page took 0.023585 seconds and 5 git commands to generate.