Initial implementation of Ioctl2 & Ioctl3

Purpose of Ioctl2 and Ioctl3 is to prevent the passing of raw pointers through ioctls
This commit is contained in:
David Marcec 2019-09-19 15:37:25 +10:00
parent 47a8e03f14
commit 87e01ad919
24 changed files with 143 additions and 63 deletions
src/core/hle/service/nvdrv

View file

@ -71,13 +71,14 @@ u32 Module::Open(const std::string& device_name) {
return fd;
}
u32 Module::Ioctl(u32 fd, u32 command, const std::vector<u8>& input, std::vector<u8>& output,
IoctlCtrl& ctrl) {
u32 Module::Ioctl(u32 fd, u32 command, const std::vector<u8>& input, const std::vector<u8>& input2,
std::vector<u8>& output, std::vector<u8>& output2, IoctlCtrl& ctrl,
IoctlVersion version) {
auto itr = open_files.find(fd);
ASSERT_MSG(itr != open_files.end(), "Tried to talk to an invalid device");
auto& device = itr->second;
return device->ioctl({command}, input, output, ctrl);
return device->ioctl({command}, input, input2, output, output2, ctrl, version);
}
ResultCode Module::Close(u32 fd) {