lkml.org 
[lkml]   [2010]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] scsi: add __print_hex() to ftrace
Joe Perches wrote:
> On Wed, 2010-01-20 at 15:43 +0900, Kei Tokunaga wrote:
>> diff -puN kernel/trace/trace_output.c~ftrace_print_hex kernel/trace/trace_output.c
>> --- linux-2.6.33-rc4-trace/kernel/trace/trace_output.c~ftrace_print_hex 2010-01-14 19:55:45.000000000 +0900
>> +++ linux-2.6.33-rc4-trace-kei/kernel/trace/trace_output.c 2010-01-14 20:02:49.000000000 +0900
>> @@ -355,6 +355,21 @@ ftrace_print_symbols_seq(struct trace_se
>> }
>> 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);
>
> hex_dump_to_buffer?
>

hex_dump_to_buffer has some limitations. For example, you have to specify:

@rowsize: number of bytes to print per line; must be 16 or 32

We can change hex_dump_to_buffer() to fit our needs, but let us do
that later.



\
 
 \ /
  Last update: 2010-01-20 08:09    [W:0.042 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site