sysdeps/managarm: properly handle errors in DRM_IOCTL_MODE_CURSOR ioctl
@@ -2162,11 +2162,15 @@ int sys_ioctl(int fd, unsigned long request, void *arg, int *result) {
managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recv_resp->data, recv_resp->length);
- __ensure(resp.error() == managarm::fs::Errors::SUCCESS);
-
+ if (resp.error() == managarm::fs::Errors::ILLEGAL_REQUEST) {
+ return ENXIO;
+ }else if (resp.error() == managarm::fs::Errors::ILLEGAL_ARGUMENT) {
+ return EINVAL;
+ }else{
*result = resp.result();
return 0;
}
+ }
case TCGETS: {
auto param = reinterpret_cast<struct termios *>(arg);
HelAction actions[4];
