diff options
author | Mat M <mathew1800@gmail.com> | 2018-12-12 13:31:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 13:31:33 +0100 |
commit | 9bae3ac33a10b33031375b3238027f8f1bd15d22 (patch) | |
tree | bd7a3067417ea35830e9dc442c61ba190f901ce7 /src/core/hle/service | |
parent | Merge pull request #1893 from lioncash/warn (diff) | |
parent | fsp_srv: Implement IStorage::GetSize (diff) | |
download | yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar.gz yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar.bz2 yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar.lz yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar.xz yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.tar.zst yuzu-9bae3ac33a10b33031375b3238027f8f1bd15d22.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 63fa48133..74c4e583b 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -45,8 +45,12 @@ public: explicit IStorage(FileSys::VirtualFile backend_) : ServiceFramework("IStorage"), backend(std::move(backend_)) { static const FunctionInfo functions[] = { - {0, &IStorage::Read, "Read"}, {1, nullptr, "Write"}, {2, nullptr, "Flush"}, - {3, nullptr, "SetSize"}, {4, nullptr, "GetSize"}, {5, nullptr, "OperateRange"}, + {0, &IStorage::Read, "Read"}, + {1, nullptr, "Write"}, + {2, nullptr, "Flush"}, + {3, nullptr, "SetSize"}, + {4, &IStorage::GetSize, "GetSize"}, + {5, nullptr, "OperateRange"}, }; RegisterHandlers(functions); } @@ -83,6 +87,15 @@ private: IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); } + + void GetSize(Kernel::HLERequestContext& ctx) { + const u64 size = backend->GetSize(); + LOG_DEBUG(Service_FS, "called, size={}", size); + + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(RESULT_SUCCESS); + rb.Push<u64>(size); + } }; class IFile final : public ServiceFramework<IFile> { |