summaryrefslogtreecommitdiffstats
path: root/tapset/aux_syscalls.stp
diff options
context:
space:
mode:
authorzhaolei <zhaolei>2007-09-06 00:15:23 +0000
committerzhaolei <zhaolei>2007-09-06 00:15:23 +0000
commit66028aa04a4b335a910fdaec783dad8c9627137e (patch)
tree329428b8a3f38c1203e7643a3ea543404f62ad7d /tapset/aux_syscalls.stp
parentf97c9399e2b5e59d2d0abec669c48e44380eb52b (diff)
downloadsystemtap-steved-66028aa04a4b335a910fdaec783dad8c9627137e.tar.gz
systemtap-steved-66028aa04a4b335a910fdaec783dad8c9627137e.tar.xz
systemtap-steved-66028aa04a4b335a910fdaec783dad8c9627137e.zip
2007-09-06 Zhaolei <zhaolei@cn.fujitsu.com>
* aux_syscalls.stp (_module_flags_str): Modify combination of flags' values.
Diffstat (limited to 'tapset/aux_syscalls.stp')
-rw-r--r--tapset/aux_syscalls.stp18
1 files changed, 13 insertions, 5 deletions
diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp
index 20cfc48b..df72773f 100644
--- a/tapset/aux_syscalls.stp
+++ b/tapset/aux_syscalls.stp
@@ -1146,11 +1146,19 @@ function _mlockall_flags_str:string(flags:long)
%}
/* used by sys_delete_module */
-function _module_flags_str(f) {
- if(!(f & 2048)) bs="WAIT|"
- if(f & 512) bs=bs."FORCE|"
- return substr(bs,0,strlen(bs)-1)
-}
+function _module_flags_str:string(flags:long)
+%{ /* pure */
+ int len;
+ long flags = THIS->flags;
+ char *str = THIS->__retvalue;
+ if (flags & O_TRUNC)
+ strlcat(str,"O_TRUNC|", MAXSTRINGLEN);
+ if (flags & O_NONBLOCK)
+ strlcat(str,"O_NONBLOCK|", MAXSTRINGLEN);
+ len = strlen(str);
+ if (len)
+ str[strlen(str)-1] = 0;
+%}
function _sched_policy_str(policy) {
if(policy==0) return "SCHED_OTHER"