ams: allow bootloader to merely approximate correct target firmware

This commit is contained in:
Michael Scire 2021-10-11 00:54:17 -07:00
parent d41de21753
commit 5708bb1557
24 changed files with 281 additions and 396 deletions

View file

@ -27,10 +27,8 @@ namespace ams::fs {
constexpr size_t MaxDirectories = 2;
constinit bool g_is_sd_mounted = false;
constinit bool g_is_sys_mounted = false;
alignas(0x10) constinit FATFS g_sd_fs = {};
alignas(0x10) constinit FATFS g_sys_fs = {};
alignas(0x10) constinit FIL g_files[MaxFiles] = {};
alignas(0x10) constinit DIR g_dirs[MaxDirectories] = {};
@ -131,18 +129,6 @@ namespace ams::fs {
g_is_sd_mounted = false;
}
bool MountSystem() {
AMS_ASSERT(!g_is_sys_mounted);
g_is_sys_mounted = f_mount(std::addressof(g_sys_fs), "sys:", 1) == FR_OK;
return g_is_sys_mounted;
}
void UnmountSystem() {
AMS_ASSERT(g_is_sys_mounted);
f_unmount("sys:");
g_is_sys_mounted = false;
}
Result GetEntryType(DirectoryEntryType *out_entry_type, bool *out_archive, const char *path) {
/* Get the file info. */
FILINFO info;