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);