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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f657fd21e1
commit
7a555613eb
@@ -227,6 +227,7 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type,
|
||||
}
|
||||
EXPORT_SYMBOL(print_hex_dump);
|
||||
|
||||
#if !defined(CONFIG_DYNAMIC_DEBUG)
|
||||
/**
|
||||
* print_hex_dump_bytes - shorthand form of print_hex_dump() with default params
|
||||
* @prefix_str: string to prefix each line with;
|
||||
@@ -246,4 +247,5 @@ void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
||||
buf, len, true);
|
||||
}
|
||||
EXPORT_SYMBOL(print_hex_dump_bytes);
|
||||
#endif
|
||||
#endif /* !defined(CONFIG_DYNAMIC_DEBUG) */
|
||||
#endif /* defined(CONFIG_PRINTK) */
|
||||
|
||||
Reference in New Issue
Block a user