1 /* 2 * inotify testcase common definitions. 3 * 4 * Copyright (c) 2012 Linux Test Project. All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of version 2 of the GNU General Public License as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it would be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * 14 * Further, this software is distributed without any warranty that it is 15 * free of the rightful claim of any third person regarding infringement 16 * or the like. Any license provided herein, whether implied or 17 * otherwise, applies only to this software file. Patent licenses, if 18 * any, provided herein do not apply to combinations of this program with 19 * other software, or any other product whatsoever. 20 * 21 * You should have received a copy of the GNU General Public License along 22 * with this program; if not, write the Free Software Foundation, Inc., 23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 * 25 * Ngie Cooper, April 2012 26 */ 27 28 #ifndef _INOTIFY_H 29 #define _INOTIFY_H 30 31 #include "lapi/syscalls.h" 32 33 /* inotify(7) wrappers */ 34 35 #if __NR_inotify_init != __LTP__NR_INVALID_SYSCALL 36 #define myinotify_init() \ 37 tst_syscall(__NR_inotify_init) 38 #else 39 #define myinotify_init() \ 40 tst_syscall(__NR_inotify_init1, 0) 41 #endif 42 43 #define myinotify_init1(flags) \ 44 tst_syscall(__NR_inotify_init1, flags) 45 46 #define myinotify_add_watch(fd, pathname, mask) \ 47 tst_syscall(__NR_inotify_add_watch, fd, pathname, mask) 48 49 #define myinotify_rm_watch(fd, wd) \ 50 tst_syscall(__NR_inotify_rm_watch, fd, wd) 51 52 #endif /* _INOTIFY_H */ 53