This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix bug of open's flags


Hi, all
   Syscall open's flag O_ASYNC is not defined in kernel src, but
FASYNC is defined. These two macros' value are same. But in current
tapset, function _sys_open_flag_str is just using the undefined
macro O_ASYNC, so the "O_ASYNC" will never appear in the return
value of _sys_open_flag_str.

I fixed it with the following patch.

--- /usr/share/systemtap/tapset/aux_syscalls.stp	2007-09-18 10:11:15.000000000 +0900
+++ tapset/aux_syscalls.stp	2007-09-18 10:17:00.000000000 +0900
@@ -984,6 +984,9 @@
#ifdef O_ASYNC
	if (flags & O_ASYNC)
		strlcat (THIS->__retvalue, "|O_ASYNC", MAXSTRINGLEN);
+#elif defined(FASYNC)
+	if (flags & FASYNC)
+		strlcat (THIS->__retvalue, "|O_ASYNC", MAXSTRINGLEN);
#endif
#ifdef O_DIRECT
	if (flags & O_DIRECT)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]