From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/8] move print_hex_dump function to include/common.h
Date: Tue, 6 Aug 2013 15:07:05 +0200 [thread overview]
Message-ID: <1375794428-29577-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1375794428-29577-1-git-send-email-s.hauer@pengutronix.de>
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>
---
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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-08-06 13:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 13:07 [PATCH] UBIFS support Sascha Hauer
2013-08-06 13:07 ` [PATCH 1/8] mtd: ubi: add missing prototype for ubi_volume_notify Sascha Hauer
2013-08-06 13:07 ` [PATCH 2/8] mtd: ubi: add ubi info functions Sascha Hauer
2013-08-06 13:07 ` [PATCH 3/8] filetype: Add ubifs detection Sascha Hauer
2013-08-06 13:07 ` [PATCH 4/8] mtd: ubi: Add support for opening a volume by cdev Sascha Hauer
2013-08-06 13:07 ` Sascha Hauer [this message]
2013-08-06 13:07 ` [PATCH 6/8] extend barebox wrapper header Sascha Hauer
2013-08-06 13:07 ` [PATCH 7/8] Add deflate_decompress function Sascha Hauer
2013-08-06 13:07 ` [PATCH 8/8] fs: Add ubifs support Sascha Hauer
2013-08-06 18:16 ` Alexander Aring
2013-08-06 19:50 ` Sascha Hauer
2013-08-06 23:50 ` Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375794428-29577-6-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox