summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-06-28 21:05:37 -0400
committerGravatar Zach Hilman2019-06-28 21:05:42 -0400
commitd40f38967e15372cf4b85c4d862ccb35b3befa40 (patch)
tree9937cfc5ef225ca02e4e1b26148b67a0be7d14d6 /src
parentreporter: Add report class for filesystem access logs (diff)
downloadyuzu-d40f38967e15372cf4b85c4d862ccb35b3befa40.tar.gz
yuzu-d40f38967e15372cf4b85c4d862ccb35b3befa40.tar.xz
yuzu-d40f38967e15372cf4b85c4d862ccb35b3befa40.zip
fsp-srv: Implement GetAccessLogVersionInfo
Returns some misc. data about logging to help the game determine if it should log.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp13
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.h4
2 files changed, 14 insertions, 3 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index bfe0c32b7..d3cd46a9b 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -718,7 +718,7 @@ FSP_SRV::FSP_SRV(const Core::Reporter& reporter) : ServiceFramework("fsp-srv"),
718 {1008, nullptr, "OpenRegisteredUpdatePartition"}, 718 {1008, nullptr, "OpenRegisteredUpdatePartition"},
719 {1009, nullptr, "GetAndClearMemoryReportInfo"}, 719 {1009, nullptr, "GetAndClearMemoryReportInfo"},
720 {1010, nullptr, "SetDataStorageRedirectTarget"}, 720 {1010, nullptr, "SetDataStorageRedirectTarget"},
721 {1011, nullptr, "OutputAccessLogToSdCard2"}, 721 {1011, &FSP_SRV::GetAccessLogVersionInfo, "GetAccessLogVersionInfo"},
722 {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, 722 {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
723 {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, 723 {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
724 {1200, nullptr, "OpenMultiCommitManager"}, 724 {1200, nullptr, "OpenMultiCommitManager"},
@@ -826,7 +826,7 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
826} 826}
827 827
828void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { 828void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
829 LOG_WARNING(Service_FS, "called"); 829 LOG_DEBUG(Service_FS, "called");
830 830
831 IPC::ResponseBuilder rb{ctx, 3}; 831 IPC::ResponseBuilder rb{ctx, 3};
832 rb.Push(RESULT_SUCCESS); 832 rb.Push(RESULT_SUCCESS);
@@ -917,4 +917,13 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
917 rb.Push(RESULT_SUCCESS); 917 rb.Push(RESULT_SUCCESS);
918} 918}
919 919
920void FSP_SRV::GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx) {
921 LOG_DEBUG(Service_FS, "called");
922
923 IPC::ResponseBuilder rb{ctx, 4};
924 rb.Push(RESULT_SUCCESS);
925 rb.PushEnum(AccessLogVersion::Latest);
926 rb.Push(access_log_program_index);
927}
928
920} // namespace Service::FileSystem 929} // namespace Service::FileSystem
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h
index bfaeaad5d..b5486a193 100644
--- a/src/core/hle/service/filesystem/fsp_srv.h
+++ b/src/core/hle/service/filesystem/fsp_srv.h
@@ -49,10 +49,12 @@ private:
49 void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); 49 void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx);
50 void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); 50 void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx);
51 void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); 51 void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx);
52 void GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx);
52 53
53 FileSys::VirtualFile romfs; 54 FileSys::VirtualFile romfs;
54 u64 current_process_id = 0; 55 u64 current_process_id = 0;
55 LogMode log_mode; 56 u32 access_log_program_index = 0;
57 LogMode log_mode = LogMode::LogToSdCard;
56 58
57 const Core::Reporter& reporter; 59 const Core::Reporter& reporter;
58}; 60};