diff options
| author | 2018-12-04 19:59:52 -0500 | |
|---|---|---|
| committer | 2018-12-04 19:59:52 -0500 | |
| commit | d08d4a366b70751cfbbbbb1844df3f62fd0da8a1 (patch) | |
| tree | b66fada812f416a30041fc4bcb6f7b15f5af7490 /src/core/hle/service | |
| parent | Merge pull request #1837 from lioncash/map (diff) | |
| parent | file_sys: Implement system archive synthesizer for NgWord (806) (diff) | |
| download | yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.gz yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.tar.xz yuzu-d08d4a366b70751cfbbbbb1844df3f62fd0da8a1.zip | |
Merge pull request #1704 from DarkLordZach/oss-sysarchive
file_sys: Implement open source system archives
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 694ec40ec..d2ffd5776 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include "core/file_sys/nca_metadata.h" | 20 | #include "core/file_sys/nca_metadata.h" |
| 21 | #include "core/file_sys/patch_manager.h" | 21 | #include "core/file_sys/patch_manager.h" |
| 22 | #include "core/file_sys/savedata_factory.h" | 22 | #include "core/file_sys/savedata_factory.h" |
| 23 | #include "core/file_sys/system_archive/system_archive.h" | ||
| 23 | #include "core/file_sys/vfs.h" | 24 | #include "core/file_sys/vfs.h" |
| 24 | #include "core/hle/ipc_helpers.h" | 25 | #include "core/hle/ipc_helpers.h" |
| 25 | #include "core/hle/kernel/process.h" | 26 | #include "core/hle/kernel/process.h" |
| @@ -831,6 +832,15 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 831 | auto data = OpenRomFS(title_id, storage_id, FileSys::ContentRecordType::Data); | 832 | auto data = OpenRomFS(title_id, storage_id, FileSys::ContentRecordType::Data); |
| 832 | 833 | ||
| 833 | if (data.Failed()) { | 834 | if (data.Failed()) { |
| 835 | const auto archive = FileSys::SystemArchive::SynthesizeSystemArchive(title_id); | ||
| 836 | |||
| 837 | if (archive != nullptr) { | ||
| 838 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 839 | rb.Push(RESULT_SUCCESS); | ||
| 840 | rb.PushIpcInterface(std::make_shared<IStorage>(archive)); | ||
| 841 | return; | ||
| 842 | } | ||
| 843 | |||
| 834 | // TODO(DarkLordZach): Find the right error code to use here | 844 | // TODO(DarkLordZach): Find the right error code to use here |
| 835 | LOG_ERROR(Service_FS, | 845 | LOG_ERROR(Service_FS, |
| 836 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, | 846 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, |