image.h/.c: use u64 for bytewise functions

This commit is contained in:
d0k3 2016-11-30 23:45:36 +01:00
parent 4da34d3ce4
commit 488dd156b5
2 changed files with 4 additions and 4 deletions

View File

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

View File

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