1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

Kernel: Modify the IOCTL API to return KResult

The kernel has been gradually moving towards KResult from just bare
int's, this change migrates the IOCTL paths.
This commit is contained in:
Brian Gianforcaro 2021-07-26 03:47:25 -07:00 committed by Ali Mohammad Pur
parent 46c9b1d81c
commit de9ff0af50
16 changed files with 151 additions and 151 deletions

View file

@ -106,14 +106,14 @@ KResult MasterPTY::close()
return KSuccess;
}
int MasterPTY::ioctl(FileDescription& description, unsigned request, Userspace<void*> arg)
KResult MasterPTY::ioctl(FileDescription& description, unsigned request, Userspace<void*> arg)
{
REQUIRE_PROMISE(tty);
if (!m_slave)
return -EIO;
return EIO;
if (request == TIOCSWINSZ || request == TIOCGPGRP)
return m_slave->ioctl(description, request, arg);
return -EINVAL;
return EINVAL;
}
String MasterPTY::absolute_path(const FileDescription&) const