[patch] Fix bug of open's flags
Lai Jiangshan
laijs@cn.fujitsu.com
Tue Sep 18 05:01:00 GMT 2007
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)
More information about the Systemtap
mailing list