diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp index 248f296..a8b5267 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp @@ -89,7 +89,7 @@ Result BpcRebootManager::PerformReboot() { switch (g_reboot_type) { case BpcRebootType::Standard: - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; case BpcRebootType::ToRcm: RebootToRcm(); return 0; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp index 85e48bd..c24c9e1 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp @@ -116,7 +116,7 @@ FsDir d; if (!Utils::IsWebAppletTid(this->title_id) || filesystem_type != FsFileSystemType_ContentManual || !Utils::IsHblTid(title_id) || R_FAILED(Utils::OpenSdDir(AtmosphereHblWebContentDir, &d))) { - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } fsDirClose(&d); } @@ -127,7 +127,7 @@ FsFileSystem fs; if (R_SUCCEEDED(fsOpenFileSystemWithPatchFwd(this->forward_service.get(), &fs, title_id, static_cast(filesystem_type)))) { fsFsClose(&fs); - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } } @@ -140,7 +140,7 @@ FsDir d; if (!Utils::IsWebAppletTid(this->title_id) || filesystem_type != FsFileSystemType_ContentManual || !Utils::IsHblTid(title_id) || R_FAILED(Utils::OpenSdDir(AtmosphereHblWebContentDir, &d))) { - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } fsDirClose(&d); } @@ -151,7 +151,7 @@ FsFileSystem fs; if (R_SUCCEEDED(fsOpenFileSystemWithIdFwd(this->forward_service.get(), &fs, title_id, static_cast(filesystem_type), path.pointer))) { fsFsClose(&fs); - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } } @@ -222,7 +222,7 @@ Result rc = 0; if (!this->should_override_contents) { - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } bool has_cache = StorageCacheGetEntry(this->title_id, &storage); @@ -275,7 +275,7 @@ } else { /* If we don't have anything to modify, there's no sense in maintaining a copy of the metadata tables. */ fsStorageClose(&data_storage); - rc = RESULT_FORWARD_TO_SESSION; + rc = ResultAtmosphereMitmShouldForwardToSession; } } } @@ -290,7 +290,7 @@ FsFile data_file; if (!this->should_override_contents) { - return RESULT_FORWARD_TO_SESSION; + return ResultAtmosphereMitmShouldForwardToSession; } std::shared_ptr storage = nullptr; @@ -342,7 +342,7 @@ } else { /* If we don't have anything to modify, there's no sense in maintaining a copy of the metadata tables. */ fsStorageClose(&data_storage); - rc = RESULT_FORWARD_TO_SESSION; + rc = ResultAtmosphereMitmShouldForwardToSession; } } } diff --git a/stratosphere/boot/source/boot_main.cpp b/stratosphere/boot/source/boot_main.cpp index 55b8882..5759fb9 100644 --- a/stratosphere/boot/source/boot_main.cpp +++ b/stratosphere/boot/source/boot_main.cpp @@ -70,22 +70,29 @@ /* Initialize services we need (TODO: NCM) */ rc = smInitialize(); - if (R_FAILED(rc)) - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_SM)); + if (R_FAILED(rc)) { + std::abort(); + } rc = fsInitialize(); - if (R_FAILED(rc)) - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS)); + if (R_FAILED(rc)) { + std::abort(); + } rc = splInitialize(); - if (R_FAILED(rc)) - fatalSimple(0xCAFE << 4 | 1); + if (R_FAILED(rc)) { + std::abort(); + } rc = pmshellInitialize(); - if (R_FAILED(rc)) - fatalSimple(0xCAFE << 4 | 2); + if (R_FAILED(rc)) { + std::abort(); + } - fsdevMountSdmc(); + rc = fsdevMountSdmc(); + if (R_FAILED(rc)) { + std::abort(); + } CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION); } diff --git a/stratosphere/fatal/source/fatal_task_screen.cpp b/stratosphere/fatal/source/fatal_task_screen.cpp index b0bf473..282b9bf 100644 --- a/stratosphere/fatal/source/fatal_task_screen.cpp +++ b/stratosphere/fatal/source/fatal_task_screen.cpp @@ -214,7 +214,7 @@ FontManager::AddSpacingLines(0.5f); FontManager::PrintFormatLine(u8"Firmware: %s (Atmosphère %u.%u.%u-%s)", GetFatalConfig()->firmware_version.display_version, CURRENT_ATMOSPHERE_VERSION, GetAtmosphereGitRevision()); FontManager::AddSpacingLines(1.5f); - if (this->ctx->error_code != 0xCAFEF) { + if (this->ctx->error_code != ResultAtmosphereVersionMismatch) { FontManager::Print(config->error_desc); } else { /* Print a special message for atmosphere version mismatch. */ diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index 2716456..8d15f82 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit 27164564a193e0a91aced93194c5e646585594e7 +Subproject commit 8d15f82a9bf8a61e45856ae764f936a2d82e8a90 diff --git a/stratosphere/loader/source/ldr_main.cpp b/stratosphere/loader/source/ldr_main.cpp index e2607cc..bf5ed23 100644 --- a/stratosphere/loader/source/ldr_main.cpp +++ b/stratosphere/loader/source/ldr_main.cpp @@ -64,23 +64,22 @@ /* Initialize services we need (TODO: SPL) */ rc = smInitialize(); if (R_FAILED(rc)) { - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_SM)); + std::abort(); } rc = fsInitialize(); if (R_FAILED(rc)) { - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS)); + std::abort(); } - rc = lrInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 1); + std::abort(); } rc = fsldrInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 2); + std::abort(); } CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION); diff --git a/stratosphere/pm/source/pm_main.cpp b/stratosphere/pm/source/pm_main.cpp index 87171b6..fbbe63d 100644 --- a/stratosphere/pm/source/pm_main.cpp +++ b/stratosphere/pm/source/pm_main.cpp @@ -90,12 +90,12 @@ rc = smInitialize(); if (R_FAILED(rc)) { - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_SM)); + std::abort(); } rc = fsprInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 1); + std::abort(); } /* This works around a bug with process permissions on < 4.0.0. */ @@ -105,32 +105,32 @@ if (R_SUCCEEDED(rc)) { smManagerAmsEndInitialDefers(); } else { - fatalSimple(0xCAFE << 4 | 2); + std::abort(); } rc = smManagerInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 3); + std::abort(); } rc = lrInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 4); + std::abort(); } rc = ldrPmInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 5); + std::abort(); } rc = splInitialize(); if (R_FAILED(rc)) { - fatalSimple(0xCAFE << 4 | 6); + std::abort(); } rc = fsInitialize(); if (R_FAILED(rc)) { - fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS)); + std::abort(); } CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);