FatFS and general file operations fixes

* Make FatFS thread safe via malloc and remove alloca.
* Fix memory leak from emmc gpt parsing
* Always unmount SD card in menu and when launching
* Use folders for Backup/Dump/Restore operations
* Add error report for some important f_opens
* Don't let partial dumping if backup chosen is not GPP or USER.
This commit is contained in:
Kostas Missos
2018-06-23 07:04:41 +03:00
parent e8ee994ad0
commit f3149e0be3
3 changed files with 77 additions and 37 deletions

View File

@@ -39,6 +39,7 @@
#include "gfx.h"
extern gfx_ctxt_t gfx_ctxt;
extern gfx_con_t gfx_con;
extern void sd_unmount();
//#define DPRINTF(...) gfx_printf(&gfx_con, __VA_ARGS__)
#define DPRINTF(...)
@@ -480,7 +481,7 @@ int hos_launch(ini_sec_t *cfg)
gfx_printf(&gfx_con, "Rebuilt and loaded package2\n");
//Unmount SD card.
f_mount(NULL, "", 1);
sd_unmount();
gfx_printf(&gfx_con, "\n%kBooting...%k\n", 0xFF96FF00, 0xFFCCCCCC);