diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-25 10:34:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-08-07 08:44:48 +0200 |
commit | be442d717e0ffd8e012e7eca7e9c14c8d555a3db (patch) | |
tree | ef4e00af9d734bf3729868ab8cce1d0094cc5073 /include/common.h | |
parent | 8fb48927da3a7c0421d0efffc02dad49eeba4050 (diff) | |
download | barebox-be442d717e0ffd8e012e7eca7e9c14c8d555a3db.tar.gz barebox-be442d717e0ffd8e012e7eca7e9c14c8d555a3db.tar.xz |
move print_hex_dump function to include/common.h
print_hex_dump is a standard kernel function, so move it outside
the ubi header files to make it usable for other code derived from
the kernel aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index e813726529..5126f2326c 100644 --- a/include/common.h +++ b/include/common.h @@ -222,6 +222,14 @@ int run_shell(void); 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); +} + int mem_parse_options(int argc, char *argv[], char *optstr, int *mode, char **sourcefile, char **destfile, int *swab); int open_and_lseek(const char *filename, int mode, loff_t pos); |