summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-04-14 21:21:34 -0400
committerGravatar GitHub2018-04-14 21:21:34 -0400
commit778be45103b43d3f08018201461c05aba442db3d (patch)
tree0d42bcb90faa3838f3e8b7e1dfdccc95faef3490 /src
parentMerge pull request #329 from bunnei/shader-gen-part-1 (diff)
parentfsp_srv: Implement IFile::Flush. (diff)
downloadyuzu-778be45103b43d3f08018201461c05aba442db3d.tar.gz
yuzu-778be45103b43d3f08018201461c05aba442db3d.tar.xz
yuzu-778be45103b43d3f08018201461c05aba442db3d.zip
Merge pull request #331 from bunnei/fsp-flush
fsp_srv: Implement IFile::Flush.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 48c45b1b4..458210a55 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -73,7 +73,7 @@ public:
73 : ServiceFramework("IFile"), backend(std::move(backend)) { 73 : ServiceFramework("IFile"), backend(std::move(backend)) {
74 static const FunctionInfo functions[] = { 74 static const FunctionInfo functions[] = {
75 {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"}, 75 {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"},
76 {2, nullptr, "Flush"}, {3, &IFile::SetSize, "SetSize"}, 76 {2, &IFile::Flush, "Flush"}, {3, &IFile::SetSize, "SetSize"},
77 {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"}, 77 {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"},
78 }; 78 };
79 RegisterHandlers(functions); 79 RegisterHandlers(functions);
@@ -152,6 +152,14 @@ private:
152 rb.Push(RESULT_SUCCESS); 152 rb.Push(RESULT_SUCCESS);
153 } 153 }
154 154
155 void Flush(Kernel::HLERequestContext& ctx) {
156 LOG_DEBUG(Service_FS, "called");
157 backend->Flush();
158
159 IPC::ResponseBuilder rb{ctx, 2};
160 rb.Push(RESULT_SUCCESS);
161 }
162
155 void SetSize(Kernel::HLERequestContext& ctx) { 163 void SetSize(Kernel::HLERequestContext& ctx) {
156 IPC::RequestParser rp{ctx}; 164 IPC::RequestParser rp{ctx};
157 const u64 size = rp.Pop<u64>(); 165 const u64 size = rp.Pop<u64>();