[PATCH 06/10] make memory display 64bit capable
Sascha Hauer
s.hauer at pengutronix.de
Tue Jun 26 15:54:59 EDT 2012
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
commands/mem.c | 4 ++--
include/common.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/commands/mem.c b/commands/mem.c
index 0719700..2b85f82 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -55,7 +55,7 @@ static char *DEVMEM = "/dev/mem";
*/
#define DISP_LINE_LEN 16
-int memory_display(char *addr, ulong offs, ulong nbytes, int size)
+int memory_display(char *addr, loff_t offs, ulong nbytes, int size)
{
ulong linebytes, i;
u_char *cp;
@@ -72,7 +72,7 @@ int memory_display(char *addr, ulong offs, ulong nbytes, int size)
u_char *ucp = (u_char *)linebuf;
uint count = 52;
- printf("%08lx:", offs);
+ printf("%08llx:", offs);
linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
for (i = 0; i < linebytes; i += size) {
diff --git a/include/common.h b/include/common.h
index 08ff0f3..799941d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -211,7 +211,7 @@ int run_shell(void);
#define PAGE_SIZE 4096
#define PAGE_SHIFT 12
-int memory_display(char *addr, ulong offs, ulong nbytes, int size);
+int memory_display(char *addr, loff_t offs, ulong nbytes, int size);
extern const char version_string[];
#ifdef CONFIG_BANNER
--
1.7.10
More information about the barebox
mailing list