mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Jason Baron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
f657fd21e1
commit
7a555613eb
4 changed files with 44 additions and 3 deletions
|
|
@ -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) */
|
||||
|
|
|
|||
Loading…
Reference in a new issue