mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
deinit filesystems before booting a firm payload
This commit is contained in:
parent
77b83bc89e
commit
fd93df60c5
@ -106,6 +106,8 @@ u32 BootFirmHandler(const char* bootpath, bool verbose, bool delete) {
|
|||||||
// boot the FIRM (if we got a proper fixpath)
|
// boot the FIRM (if we got a proper fixpath)
|
||||||
if (*fixpath) {
|
if (*fixpath) {
|
||||||
if (delete) PathDelete(bootpath);
|
if (delete) PathDelete(bootpath);
|
||||||
|
DeinitExtFS();
|
||||||
|
DeinitSDCardFS();
|
||||||
PXI_DoCMD(PXI_SET_VMODE, (u32[]){1}, 1);
|
PXI_DoCMD(PXI_SET_VMODE, (u32[]){1}, 1);
|
||||||
PXI_DoCMD(PXI_LEGACY_MODE, NULL, 0);
|
PXI_DoCMD(PXI_LEGACY_MODE, NULL, 0);
|
||||||
BootFirm((FirmHeader*) firm, fixpath);
|
BootFirm((FirmHeader*) firm, fixpath);
|
||||||
|
@ -1417,6 +1417,8 @@ bool run_cmd(cmd_id id, u32 flags, char** argv, char* err_str) {
|
|||||||
snprintf(fixpath, 256, "%s%s", (*argv[0] == '0') ? "sdmc" : "nand", argv[0] + 1);
|
snprintf(fixpath, 256, "%s%s", (*argv[0] == '0') ? "sdmc" : "nand", argv[0] + 1);
|
||||||
else strncpy(fixpath, argv[0], 256);
|
else strncpy(fixpath, argv[0], 256);
|
||||||
fixpath[255] = '\0';
|
fixpath[255] = '\0';
|
||||||
|
DeinitExtFS();
|
||||||
|
DeinitSDCardFS();
|
||||||
PXI_DoCMD(PXI_SET_VMODE, (u32[]){1}, 1);
|
PXI_DoCMD(PXI_SET_VMODE, (u32[]){1}, 1);
|
||||||
PXI_DoCMD(PXI_LEGACY_MODE, NULL, 0);
|
PXI_DoCMD(PXI_LEGACY_MODE, NULL, 0);
|
||||||
BootFirm((FirmHeader*)(void*)firm, fixpath);
|
BootFirm((FirmHeader*)(void*)firm, fixpath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user