diff options
| author | Steve Dickson <steved@redhat.com> | 2011-11-12 08:55:42 -0500 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2011-11-12 08:55:42 -0500 |
| commit | 8dc5f487ec8f810704bdc70191d7b4e71f5f6174 (patch) | |
| tree | ae615a846f68fec6e34b08b73150b4369c2c5be5 /tapset | |
| parent | 1fab51bf18976626f580d99349eee1b6008c6a77 (diff) | |
| download | systemtap-8dc5f487ec8f810704bdc70191d7b4e71f5f6174.tar.gz systemtap-8dc5f487ec8f810704bdc70191d7b4e71f5f6174.tar.xz systemtap-8dc5f487ec8f810704bdc70191d7b4e71f5f6174.zip | |
Added key ring probs
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset')
| -rw-r--r-- | tapset/iserr.stp | 11 | ||||
| -rw-r--r-- | tapset/key.stp | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tapset/iserr.stp b/tapset/iserr.stp new file mode 100644 index 0000000..26207fd --- /dev/null +++ b/tapset/iserr.stp @@ -0,0 +1,11 @@ +%{ +#include <linux/types.h> +#include <linux/err.h> +%} + +function is_err:long(_ptr:long) +%{ + THIS->__retvalue = (long)IS_ERR((char *)THIS->_ptr); + + CATCH_DEREF_FAULT(); +%} diff --git a/tapset/key.stp b/tapset/key.stp new file mode 100644 index 0000000..7a40d7d --- /dev/null +++ b/tapset/key.stp @@ -0,0 +1,12 @@ +%{ +#include <linux/key-type.h> +%} + +function key_type:string(_ptr:long) +%{ + struct key_type *type = (struct key_type *)(long)kread(&(THIS->_ptr)); + + snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", type->name); + + CATCH_DEREF_FAULT(); +%} |
