summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2018-03-29 18:32:17 +0200
committerLéo Lam <leo@innovatetechnologi.es>2018-04-07 23:35:28 +0200
commitb74577ff43a3bb3c8422153507a0df29cb618ccf (patch)
treec6784cd81d31ec90efdadf4cd38ba5ad9cfc5efb /Source/Core
parent896d8751879e8b7d3368ad7a515ccc1b0f1b3b72 (diff)
IOS/FS: Emulate GetAttr() timing
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/FS/FileSystemProxy.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp
index 4c3b8599c4..e03e2af196 100644
--- a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp
+++ b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp
@@ -380,10 +380,11 @@ IPCCommandResult FS::GetAttribute(const Handle& handle, const IOCtlRequest& requ
return GetFSReply(ConvertResult(ResultCode::Invalid));
const std::string path = Memory::GetString(request.buffer_in, 64);
+ const u64 ticks = EstimateFileLookupTicks(path, FileLookupMode::Split);
const Result<Metadata> metadata = m_ios.GetFS()->GetMetadata(handle.uid, handle.gid, path);
LogResult(StringFromFormat("GetMetadata(%s)", path.c_str()), metadata);
if (!metadata)
- return GetFSReply(ConvertResult(metadata.Error()));
+ return GetFSReply(ConvertResult(metadata.Error()), ticks);
// Yes, the other members aren't copied at all. Actually, IOS does not even memset
// the struct at all, which means uninitialised bytes from the stack are returned.
@@ -396,7 +397,7 @@ IPCCommandResult FS::GetAttribute(const Handle& handle, const IOCtlRequest& requ
out.group_mode = metadata->group_mode;
out.other_mode = metadata->other_mode;
Memory::CopyToEmu(request.buffer_out, &out, sizeof(out));
- return GetFSReply(IPC_SUCCESS);
+ return GetFSReply(IPC_SUCCESS, ticks);
}
IPCCommandResult FS::DeleteFile(const Handle& handle, const IOCtlRequest& request)