summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2018-04-14 19:46:09 -0400
committerGravatar bunnei2018-04-14 19:46:09 -0400
commit9cab6809f2f2263a077deb299d641bf3c8602e91 (patch)
tree868514f83a16b12d3d2de3f01519c11914d40fa4 /src/core
parentMerge pull request #323 from Hexagon12/stub-hid (diff)
downloadyuzu-9cab6809f2f2263a077deb299d641bf3c8602e91.tar.gz
yuzu-9cab6809f2f2263a077deb299d641bf3c8602e91.tar.xz
yuzu-9cab6809f2f2263a077deb299d641bf3c8602e91.zip
fsp_srv: Implement IFile::Flush.
Diffstat (limited to 'src/core')
-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>();