IOS: Include the UID and GID in open requests

Accuracy change. Required to implement ES contexts properly.
This commit is contained in:
Léo Lam 2017-04-24 23:48:05 +02:00
parent dd31a403db
commit c01fda6255
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,8 @@ OpenRequest::OpenRequest(const u32 address_) : Request(address_)
{
path = Memory::GetString(Memory::Read_U32(address + 0xc));
flags = static_cast<OpenMode>(Memory::Read_U32(address + 0x10));
uid = GetUIDForPPC();
gid = GetGIDForPPC();
}
ReadWriteRequest::ReadWriteRequest(const u32 address_) : Request(address_)

View File

@ -92,6 +92,10 @@ struct OpenRequest final : Request
{
std::string path;
OpenMode flags = IOS_OPEN_READ;
// The UID and GID are not part of the IPC request sent from the PPC to the Starlet,
// but they are set after they reach IOS and are dispatched to the appropriate module.
u32 uid = 0;
u16 gid = 0;
explicit OpenRequest(u32 address);
};