diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2012-12-05 16:48:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 15:19:09 -0500 |
commit | 7a555613eb77c69eb6e48b61bc5f72dd42fa1780 (patch) | |
tree | fd2c5ef59a77ba532a5957923f9919fa170027f9 /lib/hexdump.c | |
parent | f657fd21e16e3ab7432c03008e19069c2ef8e150 (diff) |
dynamic_debug: dynamic hex dump
Introduce print_hex_dump_debug() that can be dynamically controlled, similar to
pr_debug.
Also, make print_hex_dump_bytes() dynamically controlled
Implement only 'p' flag (_DPRINTK_FLAGS_PRINT) to keep it simple since hex dump prints
multiple lines and long prefix would impact readability.
To provide line/file etc. information, use pr_debug or similar
before/after print_hex_dump_debug()
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/hexdump.c')
-rw-r--r-- | lib/hexdump.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hexdump.c b/lib/hexdump.c index 6540d657dca4..3f0494c9d57a 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c | |||
@@ -227,6 +227,7 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type, | |||
227 | } | 227 | } |
228 | EXPORT_SYMBOL(print_hex_dump); | 228 | EXPORT_SYMBOL(print_hex_dump); |
229 | 229 | ||
230 | #if !defined(CONFIG_DYNAMIC_DEBUG) | ||
230 | /** | 231 | /** |
231 | * print_hex_dump_bytes - shorthand form of print_hex_dump() with default params | 232 | * print_hex_dump_bytes - shorthand form of print_hex_dump() with default params |
232 | * @prefix_str: string to prefix each line with; | 233 | * @prefix_str: string to prefix each line with; |
@@ -246,4 +247,5 @@ void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | |||
246 | buf, len, true); | 247 | buf, len, true); |
247 | } | 248 | } |
248 | EXPORT_SYMBOL(print_hex_dump_bytes); | 249 | EXPORT_SYMBOL(print_hex_dump_bytes); |
249 | #endif | 250 | #endif /* !defined(CONFIG_DYNAMIC_DEBUG) */ |
251 | #endif /* defined(CONFIG_PRINTK) */ | ||