Home
last modified time | relevance | path

Searched hist:"31550 a16a5d2af859e8a11839e8c6c6c9c92dfa7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/lib/
H A Dvsprintf.cdiff 31550a16a5d2af859e8a11839e8c6c6c9c92dfa7 Mon Jul 30 16:40:27 CDT 2012 Andy Shevchenko <andriy.shevchenko@linux.intel.com> vsprintf: add support of '%*ph[CDN]'

There are many places in the kernel where the drivers print small buffers
as a hex string. This patch adds a support of the variable width buffer
to print it as a hex string with a delimiter. The idea came from Pavel
Roskin here: http://www.digipedia.pl/usenet/thread/18835/17449/

Sample output of
pr_info("buf[%d:%d] %*phC\n", from, len, len, &buf[from]);
could be look like this:
[ 0.726130] buf[51:8] e8:16:b6:ef:e3:74:45:6e
[ 0.750736] buf[59:15] 31:81:b8:3f:35:49:06:ae:df:32:06:05:4a:af:55
[ 0.757602] buf[17:5] ac:16:d5:2c:ef

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>