Thread (53 messages) 53 messages, 3 authors, 2014-12-16
STALE4236d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 03/25] crypto: ansi_cprng - Use %phN rather than print_hex_dump for debug

From: George Spelvin <hidden>
Date: 2014-12-07 12:26:56
Subsystem: crypto api, the rest · Maintainers: Herbert Xu, "David S. Miller", Linus Torvalds

Since the goal is to compare to NIST test vectors, which are printed
on a single like without spaces, this comes much closer.

Signed-off-by: George Spelvin <redacted>
---
 crypto/ansi_cprng.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 143e0cfa..b54e4e75 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -60,10 +60,7 @@ static int dbg;
 static void hexdump(char *note, unsigned char *buf, unsigned int len)
 {
 	if (dbg) {
-		printk(KERN_CRIT "%s", note);
-		print_hex_dump(KERN_CONT, "", DUMP_PREFIX_OFFSET,
-				16, 1,
-				buf, len, false);
+		printk(KERN_CRIT "%s%*phN", note, (int)len, buf);
 	}
 }
 
-- 
2.1.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help