flag parameters: check magic constants

This patch adds test that ensure the boundary conditions for the various
constants introduced in the previous patches is met.  No code is generated.

[[email protected]: fix alpha]
Signed-off-by: Ulrich Drepper <[email protected]>
Acked-by: Davide Libenzi <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Ulrich Drepper 2008-07-23 21:29:42 -07:00 • committed by Linus Torvalds
commit e38b36f325
6 changed files with 25 additions and 0 deletions

View file

@ -1051,6 +1051,9 @@ asmlinkage long sys_epoll_create2(int size, int flags)
int error, fd = -1;
struct eventpoll *ep;
/* Check the EPOLL_* constant for consistency. */
BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC);
if (flags & ~EPOLL_CLOEXEC)
return -EINVAL;