summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2008-02-01 12:39:35 -0500
committerSteve Dickson <steved@redhat.com>2008-02-01 12:39:35 -0500
commit5d0ba22f898aeaa42b2769875ecba1f63f7fec64 (patch)
tree1c99ac3ddf616ff67475cd31058f1c68bf4ee7e4 /tapset
parent61f3bef75ff080363b2d4521b114b0290d28266c (diff)
downloadsystemtap-5d0ba22f898aeaa42b2769875ecba1f63f7fec64.tar.gz
systemtap-5d0ba22f898aeaa42b2769875ecba1f63f7fec64.tar.xz
systemtap-5d0ba22f898aeaa42b2769875ecba1f63f7fec64.zip
Added nfs4_lookup_root and nfs_fh parsing
Diffstat (limited to 'tapset')
-rw-r--r--tapset/nfs_fh.stp41
1 files changed, 41 insertions, 0 deletions
diff --git a/tapset/nfs_fh.stp b/tapset/nfs_fh.stp
new file mode 100644
index 0000000..f4f21d4
--- /dev/null
+++ b/tapset/nfs_fh.stp
@@ -0,0 +1,41 @@
+
+%{
+#include <linux/nfs.h>
+%}
+
+
+function nfsfh:string(_nfsfh:long)
+%{
+ struct nfs_fh *fh = (struct nfs_fh *)(long) kread(&(THIS->_nfsfh));
+ char buf[MAXSTRINGLEN], *str, octet[10];
+ int cc=0, i, j;
+
+ unsigned short ofs, len;
+
+ sprintf(buf+cc, "fh: %d: ", fh->size);
+ cc = strlen(buf);
+
+ str = buf+cc;
+ len = fh->size;
+ for (ofs = 0; ofs < len; ofs += 16) {
+ /*
+ sprintf(str, "%03d: ", ofs );
+ */
+ for (i=0; i < 16; i++) {
+ if ((i + ofs) < len)
+ sprintf(octet, "%02x", fh->data[ofs + i]);
+ else
+ strcpy(octet, " ");
+ strcat(str, octet);
+ }
+ /*
+ strcat(str, " \n");
+ */
+ j = strlen(str);
+ str += j;
+ }
+
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf);
+
+ CATCH_DEREF_FAULT();
+%}