[sd tools] Utilize sd_file_read better

Additionally fix a long standing fread/fwrite bug, via a FatFS fix.
(Doesn't affect Tegra arch though)
This commit is contained in:
ctcaer@gmail.com
2019-03-16 23:35:43 +02:00
parent 491c4efe9c
commit 961768e14e
5 changed files with 48 additions and 56 deletions

View File

@@ -29,7 +29,7 @@
extern heap_t _heap;
extern void *sd_file_read(char *path);
extern void *sd_file_read(const char *path, u32 *fsize);
extern bool sd_mount();
extern void sd_unmount();
@@ -101,7 +101,7 @@ int ianos_loader(bool sdmount, char *path, elfType_t type, void *moduleConfig)
}
}
fileBuf = sd_file_read(path);
fileBuf = sd_file_read(path, NULL);
if (sdmount)
sd_unmount();