Home | History | Annotate | Download | only in inotify
      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  * Garrett Cooper, April 2012
     26  */
     27 
     28 #ifndef	_INOTIFY_H
     29 #define	_INOTIFY_H
     30 
     31 /* inotify(7) wrappers */
     32 
     33 #if __NR_inotify_init != __LTP__NR_INVALID_SYSCALL
     34 #define	myinotify_init() \
     35 	syscall(__NR_inotify_init)
     36 #else
     37 #define	myinotify_init() \
     38 	syscall(__NR_inotify_init1, 0)
     39 #endif
     40 
     41 #define	myinotify_add_watch(fd, pathname, mask)	\
     42 	syscall(__NR_inotify_add_watch, fd, pathname, mask)
     43 
     44 #define	myinotify_rm_watch(fd, wd) \
     45 	syscall(__NR_inotify_rm_watch, fd, wd)
     46 
     47 #endif /* _INOTIFY_H */
     48