Commit 354c31a7 authored by Matt Mackall's avatar Matt Mackall Committed by Linus Torvalds

[PATCH] random: run-time configurable debugging

Add run-time switchable entropy debugging.  Entire debug infrastructure
remains compiled out by default.
Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9f516363
...@@ -473,12 +473,15 @@ static inline __u32 int_ln_12bits(__u32 word) ...@@ -473,12 +473,15 @@ static inline __u32 int_ln_12bits(__u32 word)
#endif #endif
#if 0 #if 0
#define DEBUG_ENT(fmt, arg...) printk(KERN_DEBUG "random %04d %04d %04d: " \ static int debug = 0;
module_param(debug, bool, 0644);
#define DEBUG_ENT(fmt, arg...) do { if (debug) \
printk(KERN_DEBUG "random %04d %04d %04d: " \
fmt,\ fmt,\
random_state->entropy_count,\ random_state->entropy_count,\
sec_random_state->entropy_count,\ sec_random_state->entropy_count,\
urandom_state->entropy_count,\ urandom_state->entropy_count,\
## arg) ## arg); } while (0)
#else #else
#define DEBUG_ENT(fmt, arg...) do {} while (0) #define DEBUG_ENT(fmt, arg...) do {} while (0)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment