diff options
author | David Smith <dsmith@redhat.com> | 2010-03-22 10:05:14 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2010-03-22 10:05:14 -0500 |
commit | 05605db9ec5e176dd440a1edf320a987210b1245 (patch) | |
tree | 766455e49e60117097c6d6ee9581583a8346f58f /tapset | |
parent | a1ecf9ff0f6fc6ef0bcdaf231ed2d395ee979b4b (diff) | |
download | systemtap-steved-05605db9ec5e176dd440a1edf320a987210b1245.tar.gz systemtap-steved-05605db9ec5e176dd440a1edf320a987210b1245.tar.xz systemtap-steved-05605db9ec5e176dd440a1edf320a987210b1245.zip |
Improve handling of O_NONBLOCK and O_CLOEXEC.
* tapset/aux_syscalls.stp (_sys_pipe2_flag_str): Separate O_NONBLOCK and
O_CLOEXEC support.
(_sys_open_flag_str): Added O_CLOEXEC support.
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/aux_syscalls.stp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index bd62817d..cffb9244 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -577,9 +577,11 @@ function _sys_pipe2_flag_str:string (f:long) char *str = THIS->__retvalue; int len; -#if defined(O_NONBLOCK) && defined(O_CLOEXEC) +#if defined(O_NONBLOCK) if (flags & O_NONBLOCK) strlcat(str, "O_NONBLOCK|", MAXSTRINGLEN); +#endif +#if defined(O_CLOEXEC) if (flags & O_CLOEXEC) strlcat(str, "O_CLOEXEC|", MAXSTRINGLEN); #endif @@ -610,6 +612,10 @@ function _sys_open_flag_str:string (f:long) if (flags & O_APPEND) strlcat (THIS->__retvalue, "|O_APPEND", MAXSTRINGLEN); #endif +#ifdef O_CLOEXEC + if (flags & O_CLOEXEC) + strlcat (THIS->__retvalue, "|O_CLOEXEC", MAXSTRINGLEN); +#endif #ifdef O_CREAT if (flags & O_CREAT) strlcat (THIS->__retvalue, "|O_CREAT", MAXSTRINGLEN); |