This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[patch] Fix bug of open's flags
- From: Lai Jiangshan <laijs at cn dot fujitsu dot com>
- To: systemtap at sourceware dot org
- Date: Tue, 18 Sep 2007 10:48:08 +0900
- Subject: [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)