From 254277f7b12ef321e36488b122c12213e61832c7 Mon Sep 17 00:00:00 2001 From: N2614 Date: Thu, 19 Jan 2012 00:15:37 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE=E3=83=93?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=81=8C=E9=80=9A=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=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@569 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../sources/ConsoleRestore/NtpClient.cpp | 48 +------------------ .../tests/ConsoleBackup/Exporter/OMakefile | 4 +- .../ConsoleBackup/Exporter/test_Exporter.cpp | 5 +- .../sources/tests/ConsoleRestore/OMakefile | 2 +- .../sources/tests/common/util/OMakefile | 3 +- .../sources/tests/common/util/test_Util.cpp | 2 +- 6 files changed, 11 insertions(+), 53 deletions(-) diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/NtpClient.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/NtpClient.cpp index b92040c..642ed08 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/NtpClient.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/NtpClient.cpp @@ -54,50 +54,6 @@ NTP_Packet s_NTPSendPacket; // 送信するNTPパケット NTP_Packet s_NTPRecvPacket; // 受信するNTPパケット const u32 NTP_PORT_NUM = 123; -nn::Result InitializeNetwork(void) -{ - nn::Result result; - nn::ac::Config config; - - result = nn::ac::Initialize(); - COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); - - // 接続要求用のパラメータを作成 - result = nn::ac::CreateDefaultConfig(&config); - if (result.IsFailure()) - { - COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); - return result; - } - - // デバッグ用に接続テストを無効化 - nn::ac::DebugSetNetworkArea(&config, nn::ac::NETWORK_AREA_LAN); - - // 接続要求を発行 - result = nn::ac::ConnectWithoutEula(config); - if (result.IsFailure()) - { - COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); - return result; - } - - return nn::ResultSuccess(); -} - -nn::Result FinalizeNetwork(void) -{ - nn::Result result; - - // 接続要求用のパラメータを作成 - result = nn::ac::Close(); - NN_UTIL_RETURN_IF_FAILED(result); - - result = nn::ac::Finalize(); - COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); - - return nn::ResultSuccess(); -} - bool GetNtpTime(u32* ntpTime) { nn::Result result; @@ -106,7 +62,7 @@ bool GetNtpTime(u32* ntpTime) NN_LOG("Initializing network.\n"); // 本体に書き込まれているネットワーク設定を使ってネットワーク接続を初期化 - result = InitializeNetwork(); + result = common::InitializeNetwork(); COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); { @@ -276,7 +232,7 @@ bool GetNtpTime(u32* ntpTime) } NN_LOG("Finalizing network.\n"); - result = FinalizeNetwork(); + result = common::FinalizeNetwork(); COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result); return retval; diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile index ef5f9f7..4d4d907 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile @@ -32,11 +32,11 @@ TEST_COMMON_SOURCES[] = ../../../common/LogConsole.cpp ../../../common/CommonLogger.cpp ../../../common/SdMountManager.cpp - ../../../common/PlayHistoryManager.cpp ../../../common/VersionDetect.cpp ../../../common/HardwareStateManager.cpp ../../../common/FileTransfer.cpp ../../../common/SdReaderWriter.cpp + ../../../common/SaveDatamover.cpp SOURCES_TEST[] = test_Exporter.cpp @@ -54,7 +54,7 @@ LIBS += libnn_test \ ROM_SPEC_FILE = ../../../ConsoleBackup/ConsoleBackup.rsf -DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/_private/RepairTool.desc +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc include $(makePlatformDefsPath build.tests) diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp index 486e320..7ee37b2 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp @@ -65,10 +65,11 @@ bool ExporterTest::InitializeSuite() nn::am::InitializeForSystemMenu(); // ヒープの確保 - common::HeapManager::GetHeap()->Initialize(nn::os::GetDeviceMemoryAddress(), nn::os::GetDeviceMemorySize(), nn::os::ALLOCATE_OPTION_LINEAR); + common::InitializeHeap(); + common::HeapManager gxHeap(s_GxHeapSize); // RenderSystem の準備 - uptr heapForGx = reinterpret_cast(common::HeapManager::GetHeap()->Allocate(s_GxHeapSize)); + uptr heapForGx = reinterpret_cast(gxHeap.GetAddr()); demo::RenderSystemDrawing renderSystem; renderSystem.Initialize(heapForGx, s_GxHeapSize); diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/OMakefile index 19fef5c..c0ed910 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/OMakefile @@ -15,6 +15,6 @@ #---------------------------------------------------------------------------- if $(IsTestBuild) - .SUBDIRS: TitleDownloader + .SUBDIRS: TitleDownloader BgsCommunicator DefineDefaultRules() diff --git a/trunk/ConsoleDataMigration/sources/tests/common/util/OMakefile b/trunk/ConsoleDataMigration/sources/tests/common/util/OMakefile index 825ae74..31e5198 100644 --- a/trunk/ConsoleDataMigration/sources/tests/common/util/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/common/util/OMakefile @@ -31,6 +31,7 @@ TEST_COMMON_SOURCES[] = ../../../common/CommonLogger.cpp ../../../common/SdMountManager.cpp ../../../common/VersionDetect.cpp + ../../../common/FileTransfer.cpp SOURCES_TEST[] = test_Util.cpp @@ -46,7 +47,7 @@ LIBS += libnn_test \ ROM_SPEC_FILE = ../../../ConsoleRestore/ConsoleRestore.rsf -DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/_private/RepairTool.desc +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc include $(makePlatformDefsPath build.tests) diff --git a/trunk/ConsoleDataMigration/sources/tests/common/util/test_Util.cpp b/trunk/ConsoleDataMigration/sources/tests/common/util/test_Util.cpp index 9910ec5..bbb2c1d 100644 --- a/trunk/ConsoleDataMigration/sources/tests/common/util/test_Util.cpp +++ b/trunk/ConsoleDataMigration/sources/tests/common/util/test_Util.cpp @@ -161,7 +161,7 @@ void UtilTest::GetSaveDataDirectoryRoot() std::wcstombs(saveDataRootStr, tmp.c_str(), tmp.size()); std::string sysSaveRoot; - common::Util::GetSaveDataDirectoryRoot(sysSaveRoot, &ivs, ivsSize); + common::Util::GetSaveDataDirectoryRoot(sysSaveRoot); NN_TEST_ASSERT_EQUAL(std::strcmp(sysSaveRoot.c_str(), saveDataRootStr), 0); }