summaryrefslogtreecommitdiffstats
path: root/tapset/string.stp
diff options
context:
space:
mode:
authorkevinrs <kevinrs>2005-09-29 00:10:45 +0000
committerkevinrs <kevinrs>2005-09-29 00:10:45 +0000
commit953064829b2fed48eda09ed69799b193df6f4aa9 (patch)
treeb3c03f30c36fec2b9058edaee3cfe3a160d116b9 /tapset/string.stp
parented10c6397cc27ad161c7fcd5242c38efd89dc5ee (diff)
downloadsystemtap-steved-953064829b2fed48eda09ed69799b193df6f4aa9.tar.gz
systemtap-steved-953064829b2fed48eda09ed69799b193df6f4aa9.tar.xz
systemtap-steved-953064829b2fed48eda09ed69799b193df6f4aa9.zip
mask_string.stp
function uses different algorithm to build symbolic flag string from int. Now uses locals to do so. SMP safe. string.stp add isinstr(s1,s2) - return 1 if s1 contains s2 else return 0
Diffstat (limited to 'tapset/string.stp')
-rw-r--r--tapset/string.stp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tapset/string.stp b/tapset/string.stp
index f6933724..64ca8c5f 100644
--- a/tapset/string.stp
+++ b/tapset/string.stp
@@ -16,3 +16,10 @@ function substr:string(str:string,start:long,stop:long) %{
THIS->__retvalue[THIS->stop]='\0';
}
%}
+
+function isinstr:long(s1:string,s2:string) %{
+ if(strstr(THIS->s1,THIS->s2)!=NULL)
+ THIS->__retvalue = 1;
+ else
+ THIS->__retvalue = 0;
+%}