From 160b5f3b2e48e00385381583b81562ea92e53a58 Mon Sep 17 00:00:00 2001 From: "H. Nikolaus Schaller" Date: Fri, 20 Apr 2012 11:54:47 +0200 Subject: fixed printing address on memory errors --- x-loader/fs/fat/fat.c | 4 ++-- x-loader/include/fat.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-loader/fs/fat/fat.c b/x-loader/fs/fat/fat.c index 068966f..e32cb62 100644 --- a/x-loader/fs/fat/fat.c +++ b/x-loader/fs/fat/fat.c @@ -354,7 +354,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) } memcpy(buffer, tmpbuf, FS_BLOCK_SIZE); if(memcmp(buffer, tmpbuf, FS_BLOCK_SIZE) != 0) { - FAT_ERROR("Memory error\n"); + FAT_ERROR("Memory error at 0x%8x\n", buffer); return -1; } startsect++; @@ -370,7 +370,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) memcpy(buffer, tmpbuf, size % FS_BLOCK_SIZE); if(memcmp(buffer, tmpbuf, size % FS_BLOCK_SIZE) != 0) { - FAT_ERROR("Memory error\n"); + FAT_ERROR("Memory error at 0x%8x\n", buffer); return -1; } return 0; diff --git a/x-loader/include/fat.h b/x-loader/include/fat.h index 6b12df5..4f70981 100644 --- a/x-loader/include/fat.h +++ b/x-loader/include/fat.h @@ -85,7 +85,7 @@ #else #define FAT_DPRINT(args...) #endif -#define FAT_ERROR(arg) printf(arg) +#define FAT_ERROR(args...) printf(args) #define ISDIRDELIM(c) ((c) == '/' || (c) == '\\') -- cgit v1.1