diff options
author | wwylele <wwylele@gmail.com> | 2016-10-21 16:10:55 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2016-11-19 17:55:35 +0100 |
commit | d7d6975af0971f5a07d489bdef522ca121bb30ec (patch) | |
tree | 561c62a130c719cd3e6ffe7051d6be8a54e30cb6 /src/core/file_sys | |
parent | FileSys: remove unused DiskArchive (diff) | |
download | yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar.gz yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar.bz2 yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar.lz yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar.xz yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.tar.zst yuzu-d7d6975af0971f5a07d489bdef522ca121bb30ec.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/archive_ncch.cpp (renamed from src/core/file_sys/archive_savedatacheck.cpp) | 22 | ||||
-rw-r--r-- | src/core/file_sys/archive_ncch.h (renamed from src/core/file_sys/archive_savedatacheck.h) | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/core/file_sys/archive_savedatacheck.cpp b/src/core/file_sys/archive_ncch.cpp index 6c4542b7d..6f1aadfc3 100644 --- a/src/core/file_sys/archive_savedatacheck.cpp +++ b/src/core/file_sys/archive_ncch.cpp @@ -9,7 +9,7 @@ #include "common/file_util.h" #include "common/logging/log.h" #include "common/string_util.h" -#include "core/file_sys/archive_savedatacheck.h" +#include "core/file_sys/archive_ncch.h" #include "core/file_sys/ivfc_archive.h" #include "core/hle/service/fs/archive.h" @@ -18,22 +18,22 @@ namespace FileSys { -static std::string GetSaveDataCheckContainerPath(const std::string& nand_directory) { +static std::string GetNCCHContainerPath(const std::string& nand_directory) { return Common::StringFromFormat("%s%s/title/", nand_directory.c_str(), SYSTEM_ID.c_str()); } -static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high, u32 low) { +static std::string GetNCCHPath(const std::string& mount_point, u32 high, u32 low) { return Common::StringFromFormat("%s%08x/%08x/content/00000000.app.romfs", mount_point.c_str(), high, low); } -ArchiveFactory_SaveDataCheck::ArchiveFactory_SaveDataCheck(const std::string& nand_directory) - : mount_point(GetSaveDataCheckContainerPath(nand_directory)) {} +ArchiveFactory_NCCH::ArchiveFactory_NCCH(const std::string& nand_directory) + : mount_point(GetNCCHContainerPath(nand_directory)) {} -ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(const Path& path) { +ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_NCCH::Open(const Path& path) { auto vec = path.AsBinary(); const u32* data = reinterpret_cast<u32*>(vec.data()); - std::string file_path = GetSaveDataCheckPath(mount_point, data[1], data[0]); + std::string file_path = GetNCCHPath(mount_point, data[1], data[0]); auto file = std::make_shared<FileUtil::IOFile>(file_path, "rb"); if (!file->IsOpen()) { @@ -45,15 +45,15 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(co return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } -ResultCode ArchiveFactory_SaveDataCheck::Format(const Path& path, - const FileSys::ArchiveFormatInfo& format_info) { - LOG_ERROR(Service_FS, "Attempted to format a SaveDataCheck archive."); +ResultCode ArchiveFactory_NCCH::Format(const Path& path, + const FileSys::ArchiveFormatInfo& format_info) { + LOG_ERROR(Service_FS, "Attempted to format a NCCH archive."); // TODO: Verify error code return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::FS, ErrorSummary::NotSupported, ErrorLevel::Permanent); } -ResultVal<ArchiveFormatInfo> ArchiveFactory_SaveDataCheck::GetFormatInfo(const Path& path) const { +ResultVal<ArchiveFormatInfo> ArchiveFactory_NCCH::GetFormatInfo(const Path& path) const { // TODO(Subv): Implement LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive %s", GetName().c_str()); return ResultCode(-1); diff --git a/src/core/file_sys/archive_savedatacheck.h b/src/core/file_sys/archive_ncch.h index e9cafbed9..66b8ce75d 100644 --- a/src/core/file_sys/archive_savedatacheck.h +++ b/src/core/file_sys/archive_ncch.h @@ -14,13 +14,13 @@ namespace FileSys { -/// File system interface to the SaveDataCheck archive -class ArchiveFactory_SaveDataCheck final : public ArchiveFactory { +/// File system interface to the NCCH archive +class ArchiveFactory_NCCH final : public ArchiveFactory { public: - ArchiveFactory_SaveDataCheck(const std::string& mount_point); + ArchiveFactory_NCCH(const std::string& mount_point); std::string GetName() const override { - return "SaveDataCheck"; + return "NCCH"; } ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override; |