summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/fsp_srv.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-10 20:14:36 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-10 20:14:36 +0100
commit5e632caca5835e67c42640f355039cc34e1690ed (patch)
tree6c983017da997babca44b4e8c64f383d260e47ed /src/core/hle/service/filesystem/fsp_srv.cpp
parentMerge pull request #1868 from lioncash/config (diff)
downloadyuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.gz
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.bz2
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.lz
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.xz
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.tar.zst
yuzu-5e632caca5835e67c42640f355039cc34e1690ed.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp17
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 d2ffd5776..c4a75a7da 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> {