diff --git a/source/arm11/menu/menu_fsel.c b/source/arm11/menu/menu_fsel.c index c6cbcbe..99d4c0a 100644 --- a/source/arm11/menu/menu_fsel.c +++ b/source/arm11/menu/menu_fsel.c @@ -152,7 +152,7 @@ // special handling when in root if(!*path) { - const char* root_paths[] = { "sdmc:", "nand:", "twln:", "twlp:" }; + const char* root_paths[] = { "sdmc:", "twln:", "twlp:", "nand:" }; for(u32 i = 0; i < sizeof(root_paths) / sizeof(const char*); i++) { diff --git a/source/fsutils.c b/source/fsutils.c index 19b05b9..6ff33ee 100644 --- a/source/fsutils.c +++ b/source/fsutils.c @@ -19,11 +19,12 @@ #include #include #include -// #include "arm11/dev.h" #include "fsutils.h" #include "util.h" #include "fs.h" + + bool fsEnsureMounted(const char *path) { s32 res = 0; @@ -32,10 +33,6 @@ { res = fMount(FS_DRIVE_SDMC); } - else if(strncmp(path, "nand:", 5) == 0) - { - res = fMount(FS_DRIVE_NAND); - } else if(strncmp(path, "twln:", 5) == 0) { res = fMount(FS_DRIVE_TWLN); @@ -44,6 +41,10 @@ { res = fMount(FS_DRIVE_TWLP); } + else if(strncmp(path, "nand:", 5) == 0) + { + res = fMount(FS_DRIVE_NAND); + } else { return false; @@ -55,10 +56,10 @@ void fsUnmountAll() { - fUnmount(FS_DRIVE_SDMC); fUnmount(FS_DRIVE_NAND); - fUnmount(FS_DRIVE_TWLN); fUnmount(FS_DRIVE_TWLP); + fUnmount(FS_DRIVE_TWLN); + fUnmount(FS_DRIVE_SDMC); } u32 fsMountNandFilesystems() @@ -75,9 +76,8 @@ void fsUnmountNandFilesystems() { fUnmount(FS_DRIVE_NAND); - fUnmount(FS_DRIVE_TWLN); fUnmount(FS_DRIVE_TWLP); - // dev_decnand->close(); // ? + fUnmount(FS_DRIVE_TWLN); } bool fsMountSdmc()