[PATCH 3/7] Use a common define for RW_BUF_SIZE

Sascha Hauer s.hauer at pengutronix.de
Wed Apr 17 07:39:04 EDT 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/mem.c   | 1 -
 include/common.h | 1 +
 lib/copy_file.c  | 2 --
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/commands/mem.c b/commands/mem.c
index a4a1658..d48f92e 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -39,7 +39,6 @@
 #define PRINTF(fmt,args...)
 #endif
 
-#define RW_BUF_SIZE	4096
 static char *rw_buf;
 
 static char *DEVMEM = "/dev/mem";
diff --git a/include/common.h b/include/common.h
index 11904ab..59fcd35 100644
--- a/include/common.h
+++ b/include/common.h
@@ -224,6 +224,7 @@ int memory_display(char *addr, loff_t offs, unsigned nbytes, int size, int swab)
 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);
+#define RW_BUF_SIZE	(unsigned)4096
 
 extern const char version_string[];
 #ifdef CONFIG_BANNER
diff --git a/lib/copy_file.c b/lib/copy_file.c
index 484b2ca..ab3d845 100644
--- a/lib/copy_file.c
+++ b/lib/copy_file.c
@@ -6,8 +6,6 @@
 #include <libbb.h>
 #include <progress.h>
 
-#define RW_BUF_SIZE	(ulong)4096
-
 /**
  * @param[in] src FIXME
  * @param[out] dst FIXME
-- 
1.8.2.rc2




More information about the barebox mailing list