Implement fanotify_init and fanotify_mark decoding

* fanotify.c: New file.
* linux/fanotify.h: Likewise.
* Makefile.am (strace_SOURCES): Add fanotify.c.
(EXTRA_DIST): Add linux/fanotify.h.
* defs.h (print_dirfd): New prototype.
* file.c (print_dirfd): Export.
* linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove.
* linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New
prototypes.
* pathtrace.c (pathtrace_match): Handle sys_fanotify_init and
sys_fanotify_mark.
diff --git a/pathtrace.c b/pathtrace.c
index f6c3b80..9fb99c4 100644
--- a/pathtrace.c
+++ b/pathtrace.c
@@ -251,6 +251,12 @@
 		return fdmatch(tcp, tcp->u_arg[2]);
 	}
 
+	if (s->sys_func == sys_fanotify_mark) {
+		/* x, x, x, fd, path */
+		return fdmatch(tcp, tcp->u_arg[3]) ||
+			upathmatch(tcp, tcp->u_arg[4]);
+	}
+
 	if (s->sys_func == sys_select ||
 	    s->sys_func == sys_oldselect ||
 	    s->sys_func == sys_pselect6)
@@ -341,7 +347,7 @@
 	    s->sys_func == sys_epoll_create ||
 	    s->sys_func == sys_socket ||
 	    s->sys_func == sys_socketpair ||
-	    strcmp(s->sys_name, "fanotify_init") == 0)
+	    s->sys_func == sys_fanotify_init)
 	{
 		/*
 		 * These have TRACE_FILE or TRACE_DESCRIPTOR or TRACE_NETWORK set,