hf mfu restore now takes bin/json files. and textual adaptations
This commit is contained in:
1 parent
8d632eee10
commit
e2e06ab17a
3 files changed
+95
-63
No files matched your search
@@ -1137,14 +1137,16 @@ int loadFileJSONex(const char *preferredName, void *data, size_t maxdatalen, siz
|
||||
sprintf(blocks, "$.blocks.%d", i);
|
||||
|
||||
size_t len = 0;
|
||||
JsonLoadBufAsHex(root, blocks, &mem->data[sptr], 4, &len);
|
||||
JsonLoadBufAsHex(root, blocks, &mem->data[sptr], MFU_BLOCK_SIZE, &len);
|
||||
if (!len)
|
||||
break;
|
||||
|
||||
sptr += len;
|
||||
mem->pages++;
|
||||
}
|
||||
|
||||
// remove one, since pages indicates a index rather than number of available pages
|
||||
--mem->pages;
|
||||
|
||||
*datalen += sptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user