9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2013-07-25 10:34:35 +02:00
parent 8fb48927da
commit be442d717e
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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);