From fc436bb09bc65ce2fc9fb6a649c73f2ad365cec6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 10 Apr 2019 13:01:48 -0400 Subject: [PATCH 1/2] fsp_srv: Log out option values in IFile's Read and Write functions These indicate options that alter how a read/write is performed. Currently we don't need to handle these, as the only one that seems to be used is for writes, but all the custom options ever seem to do is immediate flushing, which we already do by default. --- src/core/hle/service/filesystem/fsp_srv.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 657baddb8..b6eefb7e0 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -115,11 +115,12 @@ private: void Read(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; - const u64 unk = rp.Pop(); + const u64 option = rp.Pop(); const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); + LOG_DEBUG(Service_FS, "called, option={}, offset=0x{:X}, length={}", option, offset, + length); // Error checking if (length < 0) { @@ -148,11 +149,12 @@ private: void Write(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; - const u64 unk = rp.Pop(); + const u64 option = rp.Pop(); const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); + LOG_DEBUG(Service_FS, "called, option={}, offset=0x{:X}, length={}", option, offset, + length); // Error checking if (length < 0) { From 86768320644ef7715ef14c655dd700a8e1dd95f9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 10 Apr 2019 13:04:05 -0400 Subject: [PATCH 2/2] fsp_srv: Remove unnecessary parameter popping in IDirectory's Read() IDirectory's Read() function doesn't take any input parameters. It only uses the output parameters that we already provide. --- src/core/hle/service/filesystem/fsp_srv.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index b6eefb7e0..0249b6992 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -252,10 +252,7 @@ private: u64 next_entry_index = 0; void Read(Kernel::HLERequestContext& ctx) { - IPC::RequestParser rp{ctx}; - const u64 unk = rp.Pop(); - - LOG_DEBUG(Service_FS, "called, unk=0x{:X}", unk); + LOG_DEBUG(Service_FS, "called."); // Calculate how many entries we can fit in the output buffer const u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry);