epoll_create: mofidy return value for epoll_create1

Change-Id: I422d7640c37105e1120db18b29d56547f447846f
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu 2020-09-29 18:04:45 +08:00 committed by Xiang Xiao
parent d087d912ee
commit bcf3381d06

View File

@ -114,7 +114,8 @@ int epoll_create1(int flags)
if (flags != EPOLL_CLOEXEC) if (flags != EPOLL_CLOEXEC)
{ {
return EINVAL; set_errno(EINVAL);
return -1;
} }
return epoll_create(CONFIG_FS_NEPOLL_DESCRIPTORS); return epoll_create(CONFIG_FS_NEPOLL_DESCRIPTORS);
@ -193,7 +194,8 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
} }
} }
return -ENOENT; set_errno(ENOENT);
return -1;
} }
case EPOLL_CTL_MOD: case EPOLL_CTL_MOD:
@ -213,11 +215,13 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
} }
} }
return -ENOENT; set_errno(ENOENT);
return -1;
} }
} }
return -EINVAL; set_errno(EINVAL);
return -1;
} }
/**************************************************************************** /****************************************************************************