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 | |
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.
-rw-r--r-- | tapset/ChangeLog | 5 | ||||
-rw-r--r-- | tapset/aux_syscalls.stp | 18 |
2 files changed, 18 insertions, 5 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index ab23144c..2aca1c4f 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2007-09-06 Zhaolei <zhaolei@cn.fujitsu.com> + + * aux_syscalls.stp (_module_flags_str): Modify combination of + flags' values. + 2007-09-04 Zhaolei <zhaolei@cn.fujitsu.com> From Lai Jiangshan <laijs@cn.fujitsu.com> 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" |