[PATCH] Hook up inotify_init1 open mode flags printer.

Mark Wielaard mjw at redhat.com
Sun Mar 21 13:41:26 UTC 2010


* file.c [LINUX] (sys_inotify_init1): New function.
* linux/syscall.h: Declare new sys_inotify_init1 handler.
* linux/bfin/syscallent.h: Hook up new handler.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
---
 file.c                    |    8 ++++++++
 linux/bfin/syscallent.h   |    2 +-
 linux/hppa/syscallent.h   |    2 +-
 linux/i386/syscallent.h   |    2 +-
 linux/syscall.h           |    1 +
 linux/x86_64/syscallent.h |    2 +-
 6 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/file.c b/file.c
index d6a2885..854548f 100644
--- a/file.c
+++ b/file.c
@@ -2885,6 +2885,14 @@ sys_inotify_rm_watch(struct tcb *tcp)
 }
 
 int
+sys_inotify_init1(struct tcb *tcp)
+{
+	if (entering(tcp))
+		printflags(open_mode_flags, tcp->u_arg[0], "O_???");
+	return 0;
+}
+
+int
 sys_fallocate(struct tcb *tcp)
 {
 	if (entering(tcp)) {
diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
index 9577d1f..c1f46a9 100644
--- a/linux/bfin/syscallent.h
+++ b/linux/bfin/syscallent.h
@@ -393,7 +393,7 @@
 	{ 1,	0,	printargs,		"epoll_create1"	}, /* 362 */
 	{ 3,	TD,	printargs,		"dup3"		}, /* 363 */
 	{ 2,	TD,	printargs,		"pipe2"		}, /* 364 */
-	{ 1,	TD,	printargs,		"inotify_init1"	}, /* 365 */
+	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 365 */
 	{ 5,	TD,	printargs,		"preadv"	}, /* 366 */
 	{ 5,	TD,	printargs,		"pwritev"	}, /* 367 */
 	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"	}, /* 368 */
diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h
index 256e9a3..b45e302 100644
--- a/linux/hppa/syscallent.h
+++ b/linux/hppa/syscallent.h
@@ -319,7 +319,7 @@
 	{ 1,	0,	printargs,		"epoll_create1"		}, /* 311 */
 	{ 3,	TD,	printargs,		"dup3"			}, /* 312 */
 	{ 2,	TD,	printargs,		"pipe2"			}, /* 313 */
-	{ 1,	TD,	printargs,		"inotify_init1"		}, /* 314 */
+	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"		}, /* 314 */
 	{ 5,	TD,	printargs,		"preadv"		}, /* 315 */
 	{ 5,	TD,	printargs,		"pwritev"		}, /* 316 */
 	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"	}, /* 317 */
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index 6f26467..d5ac47c 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -362,7 +362,7 @@
 	{ 1,	0,	sys_epoll_create1,	"epoll_create1"	}, /* 329 */
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 330 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 331 */
-	{ 1,	TD,	printargs,		"inotify_init1"	}, /* 332 */
+	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 332 */
 	{ 5,	0,	printargs,		"SYS_333"	}, /* 333 */
 	{ 5,	0,	printargs,		"SYS_334"	}, /* 334 */
 	{ 5,	0,	printargs,		"SYS_335"	}, /* 335 */
diff --git a/linux/syscall.h b/linux/syscall.h
index 03c8b81..4de6095 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -135,6 +135,7 @@ int sys_poll();
 int sys_mincore();
 int sys_inotify_add_watch();
 int sys_inotify_rm_watch();
+int sys_inotify_init1();
 int sys_pselect6();
 int sys_ppoll();
 int sys_unshare();
diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h
index 69916de..c8d747c 100644
--- a/linux/x86_64/syscallent.h
+++ b/linux/x86_64/syscallent.h
@@ -292,4 +292,4 @@
 	{ 1,	0,	sys_epoll_create1,	"epoll_create1"	}, /* 291 */
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 292 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 293 */
-	{ 1,	TD,	printargs,		"inotify_init1"	}, /* 294 */
+	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 294 */
-- 
1.6.6.1





More information about the Strace-devel mailing list