summaryrefslogtreecommitdiffstats
path: root/tapset/aux_syscalls.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2010-03-20 19:58:29 +0100
committerMark Wielaard <mjw@redhat.com>2010-03-21 17:34:41 +0100
commit816395d6f1c433cddc1eaecba2248168c1dd4a5a (patch)
tree96fe777697334f937c46f1db0835a063c9aec001 /tapset/aux_syscalls.stp
parent92ef533e0241eb1a39ef7ceef8dce52e4ae9d820 (diff)
downloadsystemtap-steved-816395d6f1c433cddc1eaecba2248168c1dd4a5a.tar.gz
systemtap-steved-816395d6f1c433cddc1eaecba2248168c1dd4a5a.tar.xz
systemtap-steved-816395d6f1c433cddc1eaecba2248168c1dd4a5a.zip
Add support for dup3 to syscall.stp tapset.
* tapset/aux_syscalls.stp (_dup3_flag_str): New helper function. * tapset/syscalls.stp (syscall.dup2): Add alternatives to handle dup3 also. * testsuite/systemtap.syscall/dup.c: New testcase.
Diffstat (limited to 'tapset/aux_syscalls.stp')
-rw-r--r--tapset/aux_syscalls.stp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp
index 87db5abb..15a70484 100644
--- a/tapset/aux_syscalls.stp
+++ b/tapset/aux_syscalls.stp
@@ -1645,6 +1645,16 @@ function _epoll_create1_flag_str:string(f:long)
#endif
%}
+function _dup3_flag_str:string(f:long)
+%{ /* pure */
+#ifdef O_CLOEXEC
+ if (THIS->f == O_CLOEXEC)
+ strlcpy (THIS->__retvalue, "O_CLOEXEC", MAXSTRINGLEN);
+ else
+#endif
+ strlcpy (THIS->__retvalue, "UNKNOWN", MAXSTRINGLEN);
+%}
+
%{
#include <linux/shm.h>
static const _stp_val_array const _stp_shmat_list[] = {