From 48480f3fc6b045e5697d304196b96de45da660ad Mon Sep 17 00:00:00 2001 From: wenji Date: Wed, 22 Aug 2007 03:41:17 +0000 Subject: 2007-08-22 Wenji Huang * nfs.stp (__iov_length): Updated, Temporary here. * nfs_proc.stp (__i2n_ip_proto): Add type cast to sockaddr_in. (nfs.proc?.*): Modify evaluating count and offset. (nfs.proc?.read.return): Delete evaluating size and units. (nfs.proc?.write.return): Modify evaluating size. (nfs.proc?.create): Modify evaluating filename and filelen. (nfs.proc?.rename): Fix typo. --- tapset/nfs.stp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tapset/nfs.stp') diff --git a/tapset/nfs.stp b/tapset/nfs.stp index 670a6650..3d4c6e42 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -254,8 +254,17 @@ function __file_parentname:string (file:long) %{ /* pure */ %} function __iov_length:long(iov:long, nr_segs:long) %{ /* pure */ - size_t count = iov_length((const struct iovec *)(long)THIS->iov, (unsigned long)THIS->nr_segs); - THIS->__retvalue = (long)count; + unsigned long seg; + size_t ret = 0; + const struct iovec *iov = (const struct iovec *)(long)THIS->iov; + unsigned long nr_segs = (unsigned long)THIS->nr_segs; + + for (seg = 0; seg < nr_segs; seg++) + ret += kread(&(iov[seg].iov_len)); + + THIS->__retvalue = (long)ret; + CATCH_DEREF_FAULT(); + %} probe nfs.fop.entries = nfs.fop.llseek, -- cgit