summaryrefslogtreecommitdiffstats
path: root/include/printk.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-11-30 20:39:36 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-03 08:37:37 +0100
commit5f46b42be1c9856e37e3e4c4fb3c1b8489f9ea95 (patch)
treeb998baedf24e57ccb5b6977997a5f0039ea35263 /include/printk.h
parente2e9582916f44319a861afe6338da518aa66fd36 (diff)
downloadbarebox-5f46b42be1c9856e37e3e4c4fb3c1b8489f9ea95.tar.gz
barebox-5f46b42be1c9856e37e3e4c4fb3c1b8489f9ea95.tar.xz
memory_display: move prototype to include/printk.h
It's where the kernel has the print_hex_dump prototypes aswell, it's a better match for these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/printk.h')
-rw-r--r--include/printk.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/printk.h b/include/printk.h
index 858e800543..4843dadd76 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -103,6 +103,17 @@ 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);
+
+#define DUMP_PREFIX_OFFSET 0
+static inline void print_hex_dump(const char *level, const char *prefix_str,
+ int prefix_type, int rowsize, int groupsize,
+ const void *buf, size_t len, bool ascii)
+{
+ memory_display(buf, 0, len, 4, 0);
+}
+
struct log_entry {
struct list_head list;
char *msg;