diff options
author | Steve Dickson <steved@redhat.com> | 2009-07-14 11:16:34 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-07-14 11:16:34 -0400 |
commit | 228e373b9e92910293b332b15f8cfd0876cd5bda (patch) | |
tree | 916701d6065f1ea49de76241b12081126d8ee6fc /tapset | |
parent | 5b0e9ed86dfa2754ffe770fb81ec362fa4da0de6 (diff) | |
download | systemtap-228e373b9e92910293b332b15f8cfd0876cd5bda.tar.gz systemtap-228e373b9e92910293b332b15f8cfd0876cd5bda.tar.xz systemtap-228e373b9e92910293b332b15f8cfd0876cd5bda.zip |
Added in some ext3, acl, and inode scripts
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/acl.stp | 27 | ||||
-rw-r--r-- | tapset/inode.stp | 13 |
2 files changed, 40 insertions, 0 deletions
diff --git a/tapset/acl.stp b/tapset/acl.stp new file mode 100644 index 0000000..ad9f88d --- /dev/null +++ b/tapset/acl.stp @@ -0,0 +1,27 @@ +%{ +#include <linux/kernel.h> +#include <linux/posix_acl.h> +%} + +function acl_dump:string(_acl:long) +%{ + struct posix_acl *acl = (struct posix_acl *)(long) kread(&(THIS->_acl)); + struct posix_acl_entry *pa; + char buf[MAXSTRINGLEN]; + int cc=0, i; + + sprintf(buf+cc, "acl(%d) ", acl->a_count); + cc = strlen(buf); + pa = acl->a_entries; + + for (i=0; i < acl->a_count; i++) { + + sprintf(buf+cc, "[%d,%d,%d] ", pa->e_tag, pa->e_perm, pa->e_id); + cc = strlen(buf); + + pa++; + } + snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + + CATCH_DEREF_FAULT(); +%} diff --git a/tapset/inode.stp b/tapset/inode.stp new file mode 100644 index 0000000..106cba1 --- /dev/null +++ b/tapset/inode.stp @@ -0,0 +1,13 @@ +%{ +#include <linux/kernel.h> +%} + +function inode_uid:string(_ino:long) +%{ + struct inode *inode = (struct inode *)(long) kread(&(THIS->_ino)); + + snprintf(THIS->__retvalue, MAXSTRINGLEN, "uid=%d gid=%d", + inode->i_uid, inode->i_gid); + + CATCH_DEREF_FAULT(); +%} |