summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tapset/ChangeLog6
-rw-r--r--tapset/LKET/Changelog5
-rwxr-xr-xtapset/LKET/aio.stp4
-rwxr-xr-xtapset/LKET/nfs.stp24
-rwxr-xr-xtapset/LKET/nfs_proc.stp32
-rwxr-xr-xtapset/LKET/nfsd.stp52
-rwxr-xr-xtapset/LKET/process.stp2
-rw-r--r--tapset/i686/syscalls.stp6
-rw-r--r--tapset/nfs.stp16
-rw-r--r--tapset/nfsd.stp34
10 files changed, 98 insertions, 83 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 3f723916..10b58a4e 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-11 Li Guanglei <guanglei@cn.ibm.com>
+ * nfs.stp, nfsd.stp: bugfix of pointer conversion on
+ 32-bit platform.
+ * i686/syscall.stp: make sys_request_key optional since
+ it failed to probe on 2.6.18/i386
+
2006-10-04 Frank Ch. Eigler <fche@elastic.org>
* context.stp (probefunc): Return empty string for
diff --git a/tapset/LKET/Changelog b/tapset/LKET/Changelog
index d0098adc..786adda9 100644
--- a/tapset/LKET/Changelog
+++ b/tapset/LKET/Changelog
@@ -1,3 +1,8 @@
+2006-10-11 Li Guanglei <guanglei@cn.ibm.com>
+
+ * aio.stp, nfs.stp, nfs_proc.stp, nfsd.stp, process.stp:
+ bugfix of pointer conversion on 32-bit platform
+
2006-10-10 Li Guanglei <guanglei@cn.ibm.com>
* hookiddefs.stp: some changes to the hookid:
diff --git a/tapset/LKET/aio.stp b/tapset/LKET/aio.stp
index 9ff93284..d5e3625d 100755
--- a/tapset/LKET/aio.stp
+++ b/tapset/LKET/aio.stp
@@ -131,7 +131,7 @@ probe _addevent.aio.io_submit_one.entry
function log_io_submit_one(hookid:long, ctx:long, user_iocb_uaddr:long)
%{
- struct iocb *user_iocb = (struct iocb *)THIS->user_iocb_uaddr;
+ struct iocb *user_iocb = (struct iocb *)((long)THIS->user_iocb_uaddr);
/* ctx | user_iocb_addr | aio_lio_opcode | >aio_reqprio |
aio_fildes | aio_buf | aio_nbytes | >aio_offset */
@@ -212,7 +212,7 @@ probe _addevent.aio.io_getevents.entry
function log_io_getevents(hookid:long, ctx_id:long, min_nr:long, nr:long,
events_uaddr:long, timeout:long)
%{
- struct timespec __user *timeout = (struct timespec *)THIS->timeout;
+ struct timespec __user *timeout = (struct timespec *)((long)THIS->timeout);
struct timespec ts;
if (unlikely(copy_from_user(&ts, timeout, sizeof(ts))))
diff --git a/tapset/LKET/nfs.stp b/tapset/LKET/nfs.stp
index 2d768acb..81061863 100755
--- a/tapset/LKET/nfs.stp
+++ b/tapset/LKET/nfs.stp
@@ -54,8 +54,8 @@ probe addevent.nfs.fop.return
addevent.nfs.fop.release.return,
addevent.nfs.fop.fsync.return,
addevent.nfs.fop.lock.return,
- addevent.nfs.fop.sendfile.return,
- addevent.nfs.fop.check_flags.return
+ addevent.nfs.fop.sendfile.return
+// addevent.nfs.fop.check_flags.return
{}
%{
@@ -79,7 +79,7 @@ probe _addevent.nfs.fop.llseek.entry
}
function log_fop_llseek(s_id:long,ino:long,offset:long,origin:long)%{ /*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -115,7 +115,7 @@ probe _addevent.nfs.fop.read.entry
}
function log_fop_rw(hookid:long,s_id:long,ino:long,buf:long,len:long,pos:long) %{ /*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -225,7 +225,7 @@ probe _addevent.nfs.fop.mmap.entry
function log_fop_mmap(s_id:long,ino:long,vm_start:long,
vm_end:long,vm_flags:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -260,7 +260,7 @@ probe _addevent.nfs.fop.open.entry
function log_fop_open(s_id:long,ino:long,flag :long , filename:string)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -295,7 +295,7 @@ probe _addevent.nfs.fop.flush.entry
function log_fop_flush(s_id:long,ino:long,ndirty:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -329,7 +329,7 @@ probe _addevent.nfs.fop.release.entry
function log_fop_release(s_id:long,ino:long,mode:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -364,7 +364,7 @@ probe _addevent.nfs.fop.fsync.entry
function log_fop_fsync(s_id:long,ino:long,ndirty:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -398,7 +398,7 @@ probe _addevent.nfs.fop.lock.entry
function log_fop_lock(s_id:long,ino:long,fl_start:long,fl_end:long,fl_type:long,fl_flag:long,cmd:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -433,7 +433,7 @@ probe _addevent.nfs.fop.sendfile.entry
function log_fop_sendfile(s_id:long,ino:long,count:long,ppos:long)
%{/*pure*/
- char * s_id = (char *)THIS->s_id;
+ char * s_id = (char *)((long)THIS->s_id);
int major,minor;
getdevice(s_id,&major,&minor);
@@ -470,6 +470,7 @@ function log_fop_check_flags(flag:long)
_lket_trace(_GROUP_NFS,_HOOKID_NFS_FOP_CHECKFLAGS_ENTRY,"%4b",THIS->flag);
%}
+/*
probe addevent.nfs.fop.check_flags.return
+= _addevent.nfs.fop.check_flags.return
{
@@ -481,6 +482,7 @@ probe _addevent.nfs.fop.check_flags.return
{
log_nfs_return(HOOKID_NFS_FOP_CHECKFLAGS_RETURN,$return)
}
+*/
probe addevent.nfs.aop
diff --git a/tapset/LKET/nfs_proc.stp b/tapset/LKET/nfs_proc.stp
index 6f969153..9ca0a8ed 100755
--- a/tapset/LKET/nfs_proc.stp
+++ b/tapset/LKET/nfs_proc.stp
@@ -104,7 +104,7 @@ probe _addevent.nfs.proc.lookup.entry
function log_proc_lookup(version:long,dir:long,filename:string)
%{
- struct inode * dir = (struct inode * )THIS->dir;
+ struct inode * dir = (struct inode * )((long)THIS->dir);
struct super_block * sb = dir->i_sb;
int major_device,minor_device;
@@ -140,7 +140,7 @@ probe _addevent.nfs.proc.read.entry
function log_proc_read(version:long,rdata:long,count:long,offset:long)
%{
- struct nfs_read_data* rdata = (struct nfs_read_data* )THIS->rdata;
+ struct nfs_read_data* rdata = (struct nfs_read_data* )((long)THIS->rdata);
struct inode *inode = rdata->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -177,7 +177,7 @@ probe _addevent.nfs.proc.write.entry
function log_proc_write(version:long,wdata:long,count:long,offset:long)
%{
- struct nfs_write_data* wdata = (struct nfs_write_data* )THIS->wdata;
+ struct nfs_write_data* wdata = (struct nfs_write_data* )((long)THIS->wdata);
struct inode *inode = wdata->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -214,7 +214,7 @@ probe _addevent.nfs.proc.commit.entry
function log_proc_commit(version:long,cdata:long,count:long,offset:long)
%{
- struct nfs_write_data* cdata = (struct nfs_write_data* )THIS->cdata;
+ struct nfs_write_data* cdata = (struct nfs_write_data* )((long)THIS->cdata);
struct inode *inode = cdata->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -252,7 +252,7 @@ probe _addevent.nfs.proc.read_setup.entry
function log_proc_read_setup(version:long,data:long,count:long,offset:long)
%{
- struct nfs_read_data* data = (struct nfs_read_data* )THIS->data;
+ struct nfs_read_data* data = (struct nfs_read_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -278,7 +278,7 @@ probe _addevent.nfs.proc.write_setup.entry
function log_proc_write_setup(version:long,data:long,count:long,offset:long,how:long)
%{
- struct nfs_write_data* data = (struct nfs_write_data* )THIS->data;
+ struct nfs_write_data* data = (struct nfs_write_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -305,7 +305,7 @@ probe _addevent.nfs.proc.commit_setup.entry
function log_proc_commit_setup(version:long,data:long,count:long,offset:long)
%{
- struct nfs_write_data* data = (struct nfs_write_data* )THIS->data;
+ struct nfs_write_data* data = (struct nfs_write_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -332,7 +332,7 @@ probe _addevent.nfs.proc.read_done.entry
function log_proc_read_done(version:long,data:long,count:long,status:long)
%{
- struct nfs_read_data* data = (struct nfs_read_data* )THIS->data;
+ struct nfs_read_data* data = (struct nfs_read_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -370,7 +370,7 @@ probe _addevent.nfs.proc.write_done.entry
function log_proc_write_done(version:long,data:long,count:long,status:long)
%{
- struct nfs_write_data* data = (struct nfs_write_data* )THIS->data;
+ struct nfs_write_data* data = (struct nfs_write_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -408,7 +408,7 @@ probe _addevent.nfs.proc.commit_done.entry
function log_proc_commit_done(version:long,data:long,count:long,status:long)
%{
- struct nfs_write_data* data = (struct nfs_write_data* )THIS->data;
+ struct nfs_write_data* data = (struct nfs_write_data* )((long)THIS->data);
struct inode *inode = data->inode;
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -447,7 +447,7 @@ probe _addevent.nfs.proc.open.entry
function log_proc_open(version:long,inode:long,
filename:string,flag:long,mode:long)
%{
- struct inode *inode = (struct inode *)THIS->inode;
+ struct inode *inode = (struct inode *)((long)THIS->inode);
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -485,7 +485,7 @@ probe _addevent.nfs.proc.release.entry
function log_proc_release(version:long,inode:long,
filename:string,flag:long,mode:long)
%{
- struct inode *inode = (struct inode *)THIS->inode;
+ struct inode *inode = (struct inode *)((long)THIS->inode);
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -522,7 +522,7 @@ probe _addevent.nfs.proc.create.entry
function log_proc_create(version:long,inode:long,filename:string,mode:long)
%{
- struct inode *inode = (struct inode *)THIS->inode;
+ struct inode *inode = (struct inode *)((long)THIS->inode);
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -559,7 +559,7 @@ probe _addevent.nfs.proc.remove.entry
function log_proc_remove(version:long,inode:long,
filename:string)
%{
- struct inode *inode = (struct inode *)THIS->inode;
+ struct inode *inode = (struct inode *)((long)THIS->inode);
struct super_block * sb = inode->i_sb;
int major_device,minor_device;
@@ -596,8 +596,8 @@ probe _addevent.nfs.proc.rename.entry
function log_proc_rename(version:long,old_dir:long,old_name:string,
new_dir:long,new_name:string)
%{
- struct inode *old_dir= (struct inode *)THIS->old_dir;
- struct inode *new_dir= (struct inode *)THIS->new_dir;
+ struct inode *old_dir= (struct inode *)((long)THIS->old_dir);
+ struct inode *new_dir= (struct inode *)((long)THIS->new_dir);
struct super_block * old_sb = old_dir->i_sb;
struct super_block * new_sb = new_dir->i_sb;
int major_old,minor_old,major_new,minor_new;
diff --git a/tapset/LKET/nfsd.stp b/tapset/LKET/nfsd.stp
index 41597a86..0880287c 100755
--- a/tapset/LKET/nfsd.stp
+++ b/tapset/LKET/nfsd.stp
@@ -110,7 +110,7 @@ probe _addevent.nfsd.lookup.entry
function log_nfsd_lookup(fhp:long,filename:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
decode_fh(&fhp->fh_handle,i_ino);
@@ -143,9 +143,9 @@ probe _addevent.nfsd.create.entry
}
function log_nfsd_create(fhp:long,filename:string,type:long,
- iap_valid:long,iap_mode:long)%{ /*pure*/
+ iap_valid:long,iap_mode:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -181,9 +181,9 @@ probe _addevent.nfsd.createv3.entry
}
function log_nfsd_createv3(fhp:long,filename:string,createmode:long,
- iap_valid:long,iap_mode:long)%{ /*pure*/
+ iap_valid:long,iap_mode:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -219,7 +219,7 @@ probe _addevent.nfsd.unlink.entry
function log_nfsd_unlink(fhp:long,filename:string,type:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -255,8 +255,8 @@ probe _addevent.nfsd.rename.entry
function log_nfsd_rename(fhp:long,filename:string,tfhp:long,tname:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct svc_fh * tfhp = (struct svc_fh*)(THIS->tfhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct svc_fh * tfhp = (struct svc_fh*)((long)THIS->tfhp);
__u64 old_ino[3],i_ino[3];
decode_fh(&fhp->fh_handle,old_ino);
@@ -293,7 +293,7 @@ probe _addevent.nfsd.open.entry
function log_nfsd_open(fhp:long,type:long,access:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -357,8 +357,8 @@ probe _addevent.nfsd.read.entry
function log_nfsd_read(fhp:long,count:long,offset:long,
vec:long,vlen:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct kvec * vec = (struct kvec *)THIS->vec;
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct kvec * vec = (struct kvec *)((long)THIS->vec);
__u64 i_ino[3];
@@ -393,9 +393,9 @@ probe _addevent.nfsd.write.entry
}
function log_nfsd_write(fhp:long,count:long,offset:long,
- vec:long,vlen:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct kvec * vec = (struct kvec *)THIS->vec;
+ vec:long,vlen:long)%{ /*pure*/
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct kvec * vec = (struct kvec *)((long)THIS->vec);
__u64 i_ino[3];
@@ -430,7 +430,7 @@ probe _addevent.nfsd.commit.entry
}
function log_nfsd_commit(fhp:long,count:long,offset:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -491,7 +491,7 @@ probe _addevent.nfsd.proc.lookup.entry
}
function log_nfsd_proc_lookup(fh:long,version:long,filename:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fh);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fh);
__u64 i_ino[3];
@@ -526,9 +526,9 @@ probe _addevent.nfsd.proc.read.entry
}
function log_nfsd_proc_read(fhp:long,version:long,count:long,offset:long,
- vec:long,vlen:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct kvec * vec = (struct kvec *)THIS->vec;
+ vec:long,vlen:long)%{ /*pure*/
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct kvec * vec = (struct kvec *)((long)THIS->vec);
__u64 i_ino[3];
@@ -564,8 +564,8 @@ probe _addevent.nfsd.proc.write.entry
function log_nfsd_proc_write(fhp:long,version:long,count:long,offset:long,
vec:long,vlen:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct kvec * vec = (struct kvec *)THIS->vec;
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct kvec * vec = (struct kvec *)((long)THIS->vec);
__u64 i_ino[3];
@@ -600,7 +600,7 @@ probe _addevent.nfsd.proc.commit.entry
}
function log_nfsd_proc_commit(fhp:long,version:long,count:long,offset:long)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -663,7 +663,7 @@ probe _addevent.nfsd.proc.remove.entry
}
function log_nfsd_proc_remove(fhp:long,version:long,filename:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
@@ -699,8 +699,8 @@ probe _addevent.nfsd.proc.rename.entry
function log_nfsd_proc_rename(fhp:long,version:long,filename:string,
tfh:long,tname:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
- struct svc_fh * tfhp = (struct svc_fh*)(THIS->tfh);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
+ struct svc_fh * tfhp = (struct svc_fh*)((long)THIS->tfh);
__u64 i_ino[3],o_ino[3];
decode_fh(&fhp->fh_handle,o_ino);
@@ -737,7 +737,7 @@ probe _addevent.nfsd.proc.create.entry
function log_nfsd_proc_create(fhp:long,version:long,filename:string)%{ /*pure*/
- struct svc_fh * fhp = (struct svc_fh*)(THIS->fhp);
+ struct svc_fh * fhp = (struct svc_fh*)((long)THIS->fhp);
__u64 i_ino[3];
decode_fh(&fhp->fh_handle,i_ino);
diff --git a/tapset/LKET/process.stp b/tapset/LKET/process.stp
index 90c5e7a1..be46c4e7 100755
--- a/tapset/LKET/process.stp
+++ b/tapset/LKET/process.stp
@@ -21,7 +21,7 @@ function log_fork_tracedata(var_id:long, task:long)
pid_t pid = (pid_t)THIS->var;
_lket_trace(_GROUP_PROCESS, THIS->var_id, "%4b", (_FMT_)pid);
*/
- struct task_struct *task = (struct task_struct *)THIS->task;
+ struct task_struct *task = (struct task_struct *)((long)THIS->task);
_lket_trace(_GROUP_PROCESS, THIS->var_id, "%4b%4b%4b", (_FMT_)task->pid,
(_FMT_)task->tgid, (_FMT_)task->parent->tgid);
%}
diff --git a/tapset/i686/syscalls.stp b/tapset/i686/syscalls.stp
index 1880ab9f..4d3bf903 100644
--- a/tapset/i686/syscalls.stp
+++ b/tapset/i686/syscalls.stp
@@ -53,6 +53,7 @@ probe syscall.quotactl.return = kernel.function("sys_quotactl").return {
name = "quotactl"
retstr = returnstr(1)
}
+
# request_key ________________________________________________
#
# asmlinkage long
@@ -61,7 +62,8 @@ probe syscall.quotactl.return = kernel.function("sys_quotactl").return {
# const char __user *_callout_info,
# key_serial_t destringid)
#
-probe syscall.request_key = kernel.function("sys_request_key") {
+
+probe syscall.request_key = kernel.function("sys_request_key")? {
name = "request_key"
type_uaddr = $_type
description_uaddr = $_description
@@ -70,7 +72,7 @@ probe syscall.request_key = kernel.function("sys_request_key") {
argstr = sprintf("%p, %p, %p, %p", type_uaddr,
description_uaddr, callout_info_uaddr, destringid)
}
-probe syscall.request_key.return = kernel.function("sys_request_key").return {
+probe syscall.request_key.return = kernel.function("sys_request_key").return? {
name = "request_key"
retstr = returnstr(1)
}
diff --git a/tapset/nfs.stp b/tapset/nfs.stp
index 2bdd170f..b8ac058c 100644
--- a/tapset/nfs.stp
+++ b/tapset/nfs.stp
@@ -59,7 +59,7 @@ function __nfsi_attr_time :long (inode:long) %{ /* pure */
/*Get ndirty from struct inode*/
function __nfsi_ndirty:long (inode:long) %{ /* pure */
- struct inode *inode = (struct inode *)(THIS->inode);
+ struct inode *inode = (struct inode *)((long)THIS->inode);
struct nfs_inode *nfsi ;
if(inode == NULL)
@@ -74,7 +74,7 @@ function __nfsi_ndirty:long (inode:long) %{ /* pure */
/*Get rsize from struct inode*/
function __nfs_server_rsize:long (inode:long) %{ /* pure */
- struct inode * inode = (struct inode *)(THIS->inode);
+ struct inode * inode = (struct inode *)((long)THIS->inode);
if(inode == NULL)
{
@@ -86,7 +86,7 @@ function __nfs_server_rsize:long (inode:long) %{ /* pure */
/*Get version from struct inode*/
function __nfs_version:long (inode:long) %{ /* pure */
- struct inode * inode = (struct inode *)(THIS->inode);
+ struct inode * inode = (struct inode *)((long)THIS->inode);
if(inode == NULL)
{
@@ -98,7 +98,7 @@ function __nfs_version:long (inode:long) %{ /* pure */
/*Get wsize from struct inode*/
function __nfs_server_wsize:long (inode:long) %{ /* pure */
- struct inode * inode = (struct inode *)(THIS->inode);
+ struct inode * inode = (struct inode *)((long)THIS->inode);
if(inode == NULL)
{
@@ -110,7 +110,7 @@ function __nfs_server_wsize:long (inode:long) %{ /* pure */
/*Get rpages from struct inode*/
function __nfs_rpages:long (inode:long) %{ /* pure */
- struct inode * inode = (struct inode *)(THIS->inode);
+ struct inode * inode = (struct inode *)((long)THIS->inode);
if(inode == NULL)
{
@@ -122,7 +122,7 @@ function __nfs_rpages:long (inode:long) %{ /* pure */
/*Get wpages from struct inode*/
function __nfs_wpages:long(inode:long) %{ /* pure */
- struct inode *inode = (struct inode*)(THIS->inode);
+ struct inode *inode = (struct inode*)((long)THIS->inode);
if(inode == NULL)
{
THIS->__retvalue = -1;
@@ -133,7 +133,7 @@ function __nfs_wpages:long(inode:long) %{ /* pure */
/*Get struct inode from struct page*/
function __p2i :long(page:long) %{ /* pure */
- struct page *page = (struct page *)(THIS->page);
+ struct page *page = (struct page *)((long)THIS->page);
if ((page == NULL) || (page->mapping == NULL)) {
THIS->__retvalue = 0;
@@ -221,7 +221,7 @@ deref_fault:
%}
function __d_loff_t :long (ppos :long) %{ /* pure */
- loff_t * ppos = (loff_t *) (THIS->ppos);
+ loff_t * ppos = (loff_t *) ((long)THIS->ppos);
if (ppos == NULL)
{
diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
index cfff8005..aabdf51a 100644
--- a/tapset/nfsd.stp
+++ b/tapset/nfsd.stp
@@ -46,7 +46,7 @@ char * fh_fmt(struct svc_fh * fhp)
/*Get file handler from argp,the index indicates the type of argp*/
function __get_fh:long(argp:long,index:long) %{ /* pure */
- int index = (int)(THIS->index);
+ int index = (int)((long)THIS->index);
struct nfsd_diropargs * argp = NULL ;
struct nfsd3_diropargs * argp3 = NULL ;
struct nfsd_readargs * argpr = NULL;
@@ -65,49 +65,49 @@ function __get_fh:long(argp:long,index:long) %{ /* pure */
switch(index)
{
- case 1: argp = (struct nfsd_diropargs *)THIS->argp;
+ case 1: argp = (struct nfsd_diropargs *)((long)THIS->argp);
fhp = &argp->fh;
break;
- case 2: argp3 = (struct nfsd3_diropargs *)THIS->argp;
+ case 2: argp3 = (struct nfsd3_diropargs *)((long)THIS->argp);
fhp = &argp3->fh;
break;
- case 3: argpr = (struct nfsd_readargs * )THIS->argp;
+ case 3: argpr = (struct nfsd_readargs * )((long)THIS->argp);
fhp = &argpr->fh;
break;
- case 4: argpr3 = (struct nfsd3_readargs * )THIS->argp;
+ case 4: argpr3 = (struct nfsd3_readargs * )((long)THIS->argp);
fhp = &argpr3->fh;
break;
- case 5: argpw = (struct nfsd_writeargs * )THIS->argp;
+ case 5: argpw = (struct nfsd_writeargs * )((long)THIS->argp);
fhp = &argpw->fh;
break;
- case 6: argpw3 = (struct nfsd3_writeargs * )THIS->argp;
+ case 6: argpw3 = (struct nfsd3_writeargs * )((long)THIS->argp);
fhp = &argpw3->fh;
break;
- case 7: argpc3 = (struct nfsd3_commitargs * )THIS->argp;
+ case 7: argpc3 = (struct nfsd3_commitargs * )((long)THIS->argp);
fhp = &argpc3->fh;
break;
- case 8: argpcr = (struct nfsd_createargs * )THIS->argp;
+ case 8: argpcr = (struct nfsd_createargs * )((long)THIS->argp);
fhp = &argpcr->fh;
break;
- case 9: argpcr3 = (struct nfsd3_createargs * )THIS->argp;
+ case 9: argpcr3 = (struct nfsd3_createargs * )((long)THIS->argp);
fhp = &argpcr3->fh;
break;
- case 10: argpre = (struct nfsd_diropargs * )THIS->argp;
+ case 10: argpre = (struct nfsd_diropargs * )((long)THIS->argp);
fhp = &argpre->fh;
break;
- case 11: argpre3 = (struct nfsd3_diropargs * )THIS->argp;
+ case 11: argpre3 = (struct nfsd3_diropargs * )((long)THIS->argp);
fhp = &argpre3->fh;
break;
- case 12: argpren = (struct nfsd_renameargs * )THIS->argp;
+ case 12: argpren = (struct nfsd_renameargs * )((long)THIS->argp);
fhp = &argpren->ffh;
break;
- case 13: argpren = (struct nfsd_renameargs * )THIS->argp;
+ case 13: argpren = (struct nfsd_renameargs * )((long)THIS->argp);
fhp = &argpren->tfh;
break;
- case 14: argpren3 = (struct nfsd3_renameargs * )THIS->argp;
+ case 14: argpren3 = (struct nfsd3_renameargs * )((long)THIS->argp);
fhp = &argpren3->ffh;
break;
- case 15: argpren3 = (struct nfsd3_renameargs * )THIS->argp;
+ case 15: argpren3 = (struct nfsd3_renameargs * )((long)THIS->argp);
fhp = &argpren3->tfh;
break;
}
@@ -135,7 +135,7 @@ function __svc_fh:string(fh :long) %{ /* pure */
%}
function p_long:long(cnt:long) %{ /* pure */
- unsigned long * count = (unsigned long *)(THIS->cnt);
+ unsigned long * count = (unsigned long *)((long)THIS->cnt);
THIS->__retvalue = *count;
%}