# inotify_init _______________________________________________
#
# long sys_inotify_init(void)
# SYSCALL_DEFINE1(inotify_init1, int, flags)
#

probe syscall.inotify_init = dw_syscall.inotify_init !,
                             nd_syscall.inotify_init ? {}
probe syscall.inotify_init.return = dw_syscall.inotify_init.return !,
                                    nd_syscall.inotify_init.return ? {}

# dw_inotify_init _____________________________________________________

probe dw_syscall.inotify_init = __syscall.inotify_init1 ?,
			     __syscall.inotify_init ?
{
}
probe __syscall.inotify_init1 = kernel.function("sys_inotify_init1").call ?
{
	@__syscall_compat_gate(@const("__NR_inotify_init1"),
			       @const("__NR_compat_inotify_init1"))
	name = "inotify_init1"
	flags = __int32($flags)
	argstr = _inotify_init1_flag_str(flags)
}
probe __syscall.inotify_init = kernel.function("sys_inotify_init").call ?
{
	name = "inotify_init"
	flags = 0
	argstr = ""
}
probe dw_syscall.inotify_init.return = __syscall.inotify_init1.return ?,
				    __syscall.inotify_init.return ?
{
}
probe __syscall.inotify_init1.return =
	kernel.function("sys_inotify_init1").return ?
{
	@__syscall_compat_gate(@const("__NR_inotify_init1"),
			       @const("__NR_compat_inotify_init1"))
	name = "inotify_init1"
	retstr = return_str(1, $return)
}
probe __syscall.inotify_init.return =
	kernel.function("sys_inotify_init").return ?
{
	name = "inotify_init"
	retstr = return_str(1, $return)
}

# nd_inotify_init _____________________________________________________

probe nd_syscall.inotify_init = __nd_syscall.inotify_init1 ?,
                                __nd_syscall.inotify_init ?
{
}
probe __nd_syscall.inotify_init1 = kprobe.function("sys_inotify_init1")
{
	@__syscall_compat_gate(@const("__NR_inotify_init1"),
			       @const("__NR_compat_inotify_init1"))
	asmlinkage()
	name = "inotify_init1"
	flags = int_arg(1)
	argstr = _inotify_init1_flag_str(flags)
}
probe __nd_syscall.inotify_init = kprobe.function("sys_inotify_init")
{
	name = "inotify_init"
	flags = 0
	argstr = ""
}
probe nd_syscall.inotify_init.return = __nd_syscall.inotify_init1.return ?,
                                       __nd_syscall.inotify_init.return ?
{
}
probe __nd_syscall.inotify_init1.return =
	kprobe.function("sys_inotify_init1").return
{
	@__syscall_compat_gate(@const("__NR_inotify_init1"),
			       @const("__NR_compat_inotify_init1"))
	name = "inotify_init1"
	retstr = returnstr(1)
}
probe __nd_syscall.inotify_init.return =
	kprobe.function("sys_inotify_init").return
{
	name = "inotify_init"
	retstr = returnstr(1)
}
