diff options
Diffstat (limited to 'include/printk.h')
-rw-r--r-- | include/printk.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/printk.h b/include/printk.h index 4843dadd76..aaad07552e 100644 --- a/include/printk.h +++ b/include/printk.h @@ -105,6 +105,14 @@ static inline int pr_print(int level, const char *format, ...) int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab); +int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbytes, + int size, int swab, const char *format, ...); + +#define pr_memory_display(level, addr, offs, nbytes, size, swab) \ + ({ \ + (level) <= LOGLEVEL ? __pr_memory_display((level), (addr), \ + (offs), (nbytes), (size), (swab), pr_fmt("")) : 0; \ + }) #define DUMP_PREFIX_OFFSET 0 static inline void print_hex_dump(const char *level, const char *prefix_str, |