From 488dd156b54be5faca77dc05c1677dd1fda5a278 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Wed, 30 Nov 2016 23:45:36 +0100 Subject: [PATCH] image.h/.c: use u64 for bytewise functions --- source/fatfs/image.c | 4 ++-- source/fatfs/image.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/fatfs/image.c b/source/fatfs/image.c index f14cf82..2bf3c02 100644 --- a/source/fatfs/image.c +++ b/source/fatfs/image.c @@ -12,7 +12,7 @@ static u32 mount_state = 0; static char mount_path[256] = { 0 }; -int ReadImageBytes(u8* buffer, u32 offset, u32 count) { +int ReadImageBytes(u8* buffer, u64 offset, u64 count) { UINT bytes_read; UINT ret; if (!count) return -1; @@ -30,7 +30,7 @@ int ReadImageBytes(u8* buffer, u32 offset, u32 count) { return (ret != 0) ? (int) ret : (bytes_read != count) ? -1 : 0; } -int WriteImageBytes(const u8* buffer, u32 offset, u32 count) { +int WriteImageBytes(const u8* buffer, u64 offset, u64 count) { UINT bytes_written; UINT ret; if (!count) return -1; diff --git a/source/fatfs/image.h b/source/fatfs/image.h index 7aad0f8..12af93d 100644 --- a/source/fatfs/image.h +++ b/source/fatfs/image.h @@ -5,8 +5,8 @@ #define IMG_RAMDRV 100 // just so there are no conflicts with file type defines -int ReadImageBytes(u8* buffer, u32 offset, u32 count); -int WriteImageBytes(const u8* buffer, u32 offset, u32 count); +int ReadImageBytes(u8* buffer, u64 offset, u64 count); +int WriteImageBytes(const u8* buffer, u64 offset, u64 count); int ReadImageSectors(u8* buffer, u32 sector, u32 count); int WriteImageSectors(const u8* buffer, u32 sector, u32 count); int SyncImage(void);