sysdeps/managarm: Add missing error handling to sys_poll
@@ -1050,6 +1050,9 @@ int sys_poll(struct pollfd *fds, nfds_t count, int timeout, int *num_events) {
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recv_resp.data(), recv_resp.length());
+ if(resp.error() == managarm::posix::Errors::ILLEGAL_ARGUMENTS) {
+ return EINVAL;
+ } else {
__ensure(resp.error() == managarm::posix::Errors::SUCCESS);
__ensure(resp.events_size() == count);
@@ -1063,6 +1066,7 @@ int sys_poll(struct pollfd *fds, nfds_t count, int timeout, int *num_events) {
*num_events = m;
return 0;
}
+}
int sys_epoll_create(int flags, int *fd) {
__ensure(!(flags & ~(EPOLL_CLOEXEC)));
