[PATCH 5/8] move print_hex_dump function to include/common.h
Sascha Hauer
s.hauer at pengutronix.de
Tue Aug 6 09:07:05 EDT 2013
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 at pengutronix.de>
---
drivers/mtd/ubi/ubi-barebox.h | 8 --------
include/common.h | 8 ++++++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/ubi/ubi-barebox.h b/drivers/mtd/ubi/ubi-barebox.h
index 58c8a62..03069d0 100644
--- a/drivers/mtd/ubi/ubi-barebox.h
+++ b/drivers/mtd/ubi/ubi-barebox.h
@@ -32,14 +32,6 @@
#define CONFIG_MTD_UBI_WL_THRESHOLD 4096
#define UBI_IO_DEBUG 0
-#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);
-}
-
/* upd.c */
static inline unsigned long copy_from_user(void *dest, const void *src,
unsigned long count)
diff --git a/include/common.h b/include/common.h
index e813726..5126f23 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);
--
1.8.4.rc1
More information about the barebox
mailing list