From 9b28440b0435d49d3cbeff80a68cb6db9d865bcc Mon Sep 17 00:00:00 2001 From: N2614 Date: Fri, 22 Feb 2013 00:46:07 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=B7=E3=83=AA=E3=82=A2=E3=83=ABNo.?= =?UTF-8?q?=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=92=E7=84=A1?= =?UTF-8?q?=E8=A6=96=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@720 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../sources/ConsoleRestore/Controller.cpp | 12 +++++++++++- .../sources/ConsoleRestore/Importer.cpp | 3 ++- .../sources/ConsoleRestore/Importer.h | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp index bac7371..e85e15c 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp @@ -57,6 +57,8 @@ bool s_SkipNupMode = false; bool s_DownloadPreinstallMode = false; // 強制プリインストール書き込みモードかどうか bool s_ForceDownloadPreinstall = false; +// シリアルNo.のチェックを無視するかどうか +bool s_IgnoreSerialNoCheck = false; // 失敗サウンドを鳴らしたかどうか bool s_PlayedFailSound = false; @@ -310,6 +312,13 @@ void CheckSerialNumber(common::HardwareStateManager& manager, common::OperationM return; } + // シリアルNo.のチェックを無視するか? + if (s_IgnoreSerialNoCheck) + { + s_RestoreState = IMPORT_RTC; + return; + } + u8 serialInSd[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN]; nn::Result result = ReadSerialNumber(serialInSd); if (result.IsFailure()) @@ -781,7 +790,7 @@ bool CheckAndReadAPSetting(common::OperationMessage& operationMessage) if (!s_ReadSettingDone) { s_ReadSettingDone = true; - s_ReadSettingIsSuccess = ReadSetting(&s_NupOnlyMode, &s_GetIvsOnlyMode, &s_CheckSdOnlyMode, &s_SkipNupMode, &s_DownloadPreinstallMode); + s_ReadSettingIsSuccess = ReadSetting(&s_NupOnlyMode, &s_GetIvsOnlyMode, &s_CheckSdOnlyMode, &s_SkipNupMode, &s_DownloadPreinstallMode, &s_IgnoreSerialNoCheck); } if (s_NupOnlyMode && s_GetIvsOnlyMode @@ -2063,6 +2072,7 @@ void InitializeState() s_GetIvsOnlyMode = false; s_CheckSdOnlyMode = false; s_SkipNupMode = false; + s_IgnoreSerialNoCheck = false; s_ExecutePreparePreinstallTitleDownload = false; s_ExecutePreinstallTitleDownload = false; s_PreinstallTitleDownloadSuccess = false; diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp index bb6fad7..fe74485 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.cpp @@ -1149,7 +1149,7 @@ void ReadSettingFlag(common::ConfigFileLoader* loader, const wchar_t* paramName, } } -bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall) +bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall, bool* ignoreSerial) { nn::Result result; bool retval = true; @@ -1456,6 +1456,7 @@ bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool ReadSettingFlag(&configfileLoader, L"CHECK_SD", checkSd, "CHECK SD Mode.\n"); ReadSettingFlag(&configfileLoader, L"SKIP_NUP", skipNup, "Skip NUP Mode.\n"); ReadSettingFlag(&configfileLoader, L"DL_PREINSTALL", dlPreinstall, "Download PreInstall Application Mode.\n"); + ReadSettingFlag(&configfileLoader, L"IGNORE_SERIAL", ignoreSerial, "Ignore Serial No. mismatch.\n"); configfileLoader.Finalize(); diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.h b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.h index 868a5b0..4699736 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.h +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Importer.h @@ -111,7 +111,7 @@ struct TimeZone }; // ネットワーク設定ファイルを読み込む -bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall); +bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall, bool* ignoreSerial); // ネットワーク設定ファイルからNTPサーバの名前を取得する // 先にReadSettingが成功している必要がある