Merge pull request #242 from ARMmbed/fix-2048-erase-size

Fix issues with large prog sizes (prog_size > 1KiB)
This commit is contained in:
Christopher Haster
2019-07-28 21:35:22 -05:00
committed by GitHub
7 changed files with 148 additions and 68 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ int lfs_emubd_create(const struct lfs_config *cfg, const char *path) {
snprintf(emu->child, LFS_NAME_MAX, ".stats");
FILE *f = fopen(emu->path, "r");
if (!f) {
memset(&emu->stats, 0, sizeof(emu->stats));
memset(&emu->stats, LFS_EMUBD_ERASE_VALUE, sizeof(emu->stats));
} else {
size_t res = fread(&emu->stats, sizeof(emu->stats), 1, f);
lfs_emubd_fromle32(emu);