diff options
author | Subv <subv2112@gmail.com> | 2018-06-12 20:42:04 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-06-19 02:26:01 +0200 |
commit | 5f57a70a7d49af76f54b390cee49bf970880323e (patch) | |
tree | f8e0e0e524852d5806d8faf12bdf272f596bfc79 /src/core/hle | |
parent | Merge pull request #555 from Subv/gpu_sysregs (diff) | |
download | yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar.gz yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar.bz2 yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar.lz yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar.xz yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.tar.zst yuzu-5f57a70a7d49af76f54b390cee49bf970880323e.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 1cf97e876..eb5748cf8 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -7,6 +7,7 @@ #include "common/string_util.h" #include "core/core.h" #include "core/file_sys/directory.h" +#include "core/file_sys/errors.h" #include "core/file_sys/filesystem.h" #include "core/file_sys/storage.h" #include "core/hle/ipc_helpers.h" @@ -531,12 +532,20 @@ void FSP_SRV::CreateSaveData(Kernel::HLERequestContext& ctx) { void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) { NGLOG_WARNING(Service_FS, "(STUBBED) called"); + // TODO(Subv): Read the input parameters and mount the requested savedata instead of always + // mounting the current process' savedata. FileSys::Path unused; - auto filesystem = OpenFileSystem(Type::SaveData, unused).Unwrap(); + auto filesystem = OpenFileSystem(Type::SaveData, unused); + + if (filesystem.Failed()) { + IPC::ResponseBuilder rb{ctx, 2, 0, 0}; + rb.Push(ResultCode(ErrorModule::FS, FileSys::ErrCodes::SaveDataNotFound)); + return; + } IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); + rb.PushIpcInterface<IFileSystem>(std::move(filesystem.Unwrap())); } void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { |