diff --git a/trunk/ConsoleDataMigration/sources/ConsoleBackup/Exporter.cpp b/trunk/ConsoleDataMigration/sources/ConsoleBackup/Exporter.cpp index 9b0bfed..9e48d77 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleBackup/Exporter.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleBackup/Exporter.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include "Exporter.h" #include "CommonLogger.h" @@ -840,6 +841,20 @@ nn::Result WriteVersionData(common::HardwareStateManager& manager) return sdWriter.WriteBufWithCmac(common::VERSION_DATA_PATHNAME, &versionData, sizeof(common::VerDef)); } +nn::Result DeleteNimSystemSaveData() +{ + COMMON_LOGGER_RETURN_RESULT_IF_FAILED( + nn::nim::InitializeForUpdater()); + + COMMON_LOGGER_RETURN_RESULT_IF_FAILED( + nn::nim::CTR::Updater::FormatSaveData()); + + COMMON_LOGGER_RETURN_RESULT_IF_FAILED( + nn::nim::FinalizeForUpdater()); + + return nn::ResultSuccess(); +} + bool DeleteNimSaveData() { nn::Result result; @@ -863,6 +878,9 @@ bool DeleteNimSaveData() result = common::SdMountManager::Unmount(); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); + COMMON_LOGGER_RETURN_FALSE_IF_FAILED( + DeleteNimSystemSaveData()); + return true; }