Browse Source

Merge pull request #331 from bunnei/fsp-flush

fsp_srv: Implement IFile::Flush.
pull/15/merge
bunnei 8 years ago
committed by GitHub
parent
commit
778be45103
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/core/hle/service/filesystem/fsp_srv.cpp

10
src/core/hle/service/filesystem/fsp_srv.cpp

@ -73,7 +73,7 @@ public:
: ServiceFramework("IFile"), backend(std::move(backend)) {
static const FunctionInfo functions[] = {
{0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"},
{2, nullptr, "Flush"}, {3, &IFile::SetSize, "SetSize"},
{2, &IFile::Flush, "Flush"}, {3, &IFile::SetSize, "SetSize"},
{4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"},
};
RegisterHandlers(functions);
@ -152,6 +152,14 @@ private:
rb.Push(RESULT_SUCCESS);
}
void Flush(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
backend->Flush();
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
void SetSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 size = rp.Pop<u64>();

Loading…
Cancel
Save