diff options
author | zhaolei <zhaolei> | 2007-09-06 00:15:23 +0000 |
---|---|---|
committer | zhaolei <zhaolei> | 2007-09-06 00:15:23 +0000 |
commit | 66028aa04a4b335a910fdaec783dad8c9627137e (patch) | |
tree | 329428b8a3f38c1203e7643a3ea543404f62ad7d /tapset/aux_syscalls.stp | |
parent | f97c9399e2b5e59d2d0abec669c48e44380eb52b (diff) | |
download | systemtap-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.stp | 18 |
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" |