1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 11:55:12 +00:00

UserspaceEmulator: Identical code on both branches, unify return in virt$ioctl

This commit is contained in:
Brian Gianforcaro 2020-08-16 17:34:31 -07:00 committed by Andreas Kling
parent 7688539402
commit 5a3cc2da8b

View file

@ -912,10 +912,7 @@ int Emulator::virt$ioctl(int fd, unsigned request, FlatPtr arg)
if (request == TCSETS) {
struct termios termios;
mmu().copy_from_vm(&termios, arg, sizeof(termios));
int rc = syscall(SC_ioctl, fd, request, &termios);
if (rc < 0)
return rc;
return rc;
return syscall(SC_ioctl, fd, request, &termios);
}
dbg() << "Unsupported ioctl: " << request;
dump_backtrace();