Only in linux-2.6.7.modified/fs/coda/: .built-in.o.cmd
Only in linux-2.6.7.modified/fs/coda/: .cache.o.cmd
Only in linux-2.6.7.modified/fs/coda/: .cnode.o.d
Only in linux-2.6.7.modified/fs/coda/: .psdev.o.cmd
diff -r -U3 linux-2.6.8.1/fs/coda/coda_linux.c linux-2.6.7.modified/fs/coda/coda_linux.c
--- linux-2.6.8.1/fs/coda/coda_linux.c	2004-08-14 12:54:46.000000000 +0200
+++ linux-2.6.7.modified/fs/coda/coda_linux.c	2004-08-13 18:32:27.000000000 +0200
@@ -115,11 +115,20 @@
 	if (attr->va_size != -1)
 		inode->i_blocks = (attr->va_size + 511) >> 9;
 	if (attr->va_atime.tv_sec != -1) 
-	        inode->i_atime = attr->va_atime;
+	{
+	        inode->i_atime.tv_sec = attr->va_atime.tv_sec;
+	        inode->i_atime.tv_nsec = attr->va_atime.tv_nsec;
+	}
 	if (attr->va_mtime.tv_sec != -1)
-	        inode->i_mtime = attr->va_mtime;
+	{
+	        inode->i_mtime.tv_sec = attr->va_mtime.tv_sec;
+	        inode->i_mtime.tv_nsec = attr->va_mtime.tv_nsec;
+	}
         if (attr->va_ctime.tv_sec != -1)
-	        inode->i_ctime = attr->va_ctime;
+	{
+	        inode->i_ctime.tv_sec = attr->va_ctime.tv_sec;
+	        inode->i_ctime.tv_nsec = attr->va_ctime.tv_nsec;
+	}
 }
 
 
@@ -140,12 +149,12 @@
         vattr->va_uid = (vuid_t) -1; 
         vattr->va_gid = (vgid_t) -1;
         vattr->va_size = (off_t) -1;
-	vattr->va_atime.tv_sec = (time_t) -1;
-	vattr->va_atime.tv_nsec =  (time_t) -1;
-        vattr->va_mtime.tv_sec = (time_t) -1;
-        vattr->va_mtime.tv_nsec = (time_t) -1;
-	vattr->va_ctime.tv_sec = (time_t) -1;
-	vattr->va_ctime.tv_nsec = (time_t) -1;
+	vattr->va_atime.tv_sec = -1;
+	vattr->va_atime.tv_nsec =  -1;
+        vattr->va_mtime.tv_sec = -1;
+        vattr->va_mtime.tv_nsec =  -1;
+	vattr->va_ctime.tv_sec =  -1;
+	vattr->va_ctime.tv_nsec =  -1;
         vattr->va_type = C_VNON;
 	vattr->va_fileid = -1;
 	vattr->va_gen = -1;
@@ -185,13 +194,16 @@
                 vattr->va_size = iattr->ia_size;
 	}
         if ( valid & ATTR_ATIME ) {
-                vattr->va_atime = iattr->ia_atime;
+                vattr->va_atime.tv_sec = iattr->ia_atime.tv_sec;
+                vattr->va_atime.tv_nsec = iattr->ia_atime.tv_nsec;
 	}
         if ( valid & ATTR_MTIME ) {
-                vattr->va_mtime = iattr->ia_mtime;
+                vattr->va_mtime.tv_sec = iattr->ia_mtime.tv_sec;
+                vattr->va_mtime.tv_nsec = iattr->ia_mtime.tv_nsec;
 	}
         if ( valid & ATTR_CTIME ) {
-                vattr->va_ctime = iattr->ia_ctime;
+                vattr->va_ctime.tv_sec = iattr->ia_ctime.tv_sec;
+                vattr->va_ctime.tv_nsec = iattr->ia_ctime.tv_nsec;
 	}
 }
 
diff -r -U3 linux-2.6.8.1/fs/coda/psdev.c linux-2.6.7.modified/fs/coda/psdev.c
--- linux-2.6.8.1/fs/coda/psdev.c	2004-08-14 12:55:35.000000000 +0200
+++ linux-2.6.7.modified/fs/coda/psdev.c	2004-08-16 17:10:24.000000000 +0200
@@ -51,6 +51,40 @@
 
 #define upc_free(r) kfree(r)
 
+#ifdef CONFIG_COMPAT
+#define _VICEIOCTL_internal(id)  (_IOW('V', id, struct ViceIoctl))
+#define _VICEIOCTL_size(id) (((_VICEIOCTL_internal(id) >> 16) & PIOCPARM_MASK) + sizeof(u_int64_t) + sizeof(int32_t))
+#define _REDEF_VICEIOCTL(id) ((_VICEIOCTL_internal(id) & ~(PIOCPARM_MASK << 16)) | ((_VICEIOCTL_size(id) & PIOCPARM_MASK) << 16))
+#include <linux/ioctl32.h>
+
+static int compat_coda_pioctl(unsigned int fd, unsigned int cmd, 
+			      unsigned long arg, struct file *filp)
+{
+	int ret = 0;
+
+	lock_kernel();
+	ret = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+	unlock_kernel();
+	return ret;
+}
+
+static int coda_psdev_ioctl(struct inode * inode, struct file * filp, 
+			    unsigned int cmd, unsigned long arg);
+
+static int compat_psdev_pioctl(unsigned int fd, unsigned int cmd, 
+			      unsigned long arg, struct file *filp)
+{
+	int ret = 0;
+
+	lock_kernel();
+	ret = coda_psdev_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+	unlock_kernel();
+	return ret;
+}
+
+#endif
+
+
 /* 
  * Coda stuff
  */
@@ -426,6 +460,17 @@
 		printk("coda: failed to register filesystem!\n");
 		goto out;
 	}
+
+#ifdef CONFIG_COMPAT
+	for (i = 0; i < 256; ++i) {
+		status = register_ioctl32_conversion(_REDEF_VICEIOCTL(i), compat_coda_pioctl);
+        	if ( status != 0 ) {
+                	printk("coda: failed to register compat_coda_pioctl\n");
+        	}
+	}
+	register_ioctl32_conversion(CIOC_KERNEL_VERSION, compat_psdev_pioctl);
+#endif
+
 	return 0;
 out:
 	for (i = 0; i < MAX_CODADEVS; i++) {
@@ -446,6 +491,16 @@
 {
         int err, i;
 
+#ifdef CONFIG_COMPAT
+	for (i = 0; i < 256; ++i) {
+		err = unregister_ioctl32_conversion(_REDEF_VICEIOCTL(i));
+        	if ( err != 0 ) {
+                	printk("coda: failed to unregister compat_coda_pioctl\n");
+        	}
+	}
+	unregister_ioctl32_conversion(CIOC_KERNEL_VERSION);
+#endif
+	
 	err = unregister_filesystem(&coda_fs_type);
         if ( err != 0 ) {
                 printk("coda: failed to unregister filesystem\n");
diff -r -U3 linux-2.6.8.1/fs/coda/upcall.c linux-2.6.7.modified/fs/coda/upcall.c
--- linux-2.6.8.1/fs/coda/upcall.c	2004-08-14 12:55:59.000000000 +0200
+++ linux-2.6.7.modified/fs/coda/upcall.c	2004-08-16 16:26:53.000000000 +0200
@@ -92,7 +92,7 @@
 	if (error) {
 	        printk("coda_get_rootfid: error %d\n", error);
 	} else {
-		*fidp = outp->coda_root.VFid;
+		*fidp = outp->coda_root.Fid;
 	}
 
 	CODA_FREE(inp, insize);
@@ -108,7 +108,7 @@
 
         insize = SIZE(getattr); 
 	UPARG(CODA_GETATTR);
-        inp->coda_getattr.VFid = *fid;
+        inp->coda_getattr.Fid= *fid;
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
 	
@@ -128,7 +128,7 @@
 	insize = SIZE(setattr);
 	UPARG(CODA_SETATTR);
 
-        inp->coda_setattr.VFid = *fid;
+        inp->coda_setattr.Fid= *fid;
 	inp->coda_setattr.attr = *vattr;
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -150,7 +150,7 @@
         insize = max_t(unsigned int, offset + length +1, OUTSIZE(lookup));
 	UPARG(CODA_LOOKUP);
 
-        inp->coda_lookup.VFid = *fid;
+        inp->coda_lookup.Fid= *fid;
 	inp->coda_lookup.name = offset;
 	inp->coda_lookup.flags = CLU_CASE_SENSITIVE;
         /* send Venus a null terminated string */
@@ -159,7 +159,7 @@
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
 
-	*resfid = outp->coda_lookup.VFid;
+	*resfid = outp->coda_lookup.Fid;
 	*type = outp->coda_lookup.vtype;
 
 	CODA_FREE(inp, insize);
@@ -186,7 +186,7 @@
 	inp->ih.uid = uid;
 #endif
 	
-        inp->coda_store.VFid = *fid;
+        inp->coda_store.Fid= *fid;
         inp->coda_store.flags = flags;
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -204,7 +204,7 @@
 	insize = SIZE(release);
 	UPARG(CODA_RELEASE);
 	
-	inp->coda_release.VFid = *fid;
+	inp->coda_release.Fid= *fid;
 	inp->coda_release.flags = flags;
 
 	error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -233,7 +233,7 @@
 	inp->ih.uid = uid;
 #endif
 	
-        inp->coda_close.VFid = *fid;
+        inp->coda_close.Fid= *fid;
         inp->coda_close.flags = flags;
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -252,7 +252,7 @@
 	insize = SIZE(open_by_fd);
 	UPARG(CODA_OPEN_BY_FD);
 
-        inp->coda_open.VFid = *fid;
+        inp->coda_open.Fid= *fid;
         inp->coda_open.flags = flags;
 
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -276,7 +276,7 @@
 	insize = max_t(unsigned int, offset + length + 1, OUTSIZE(mkdir));
 	UPARG(CODA_MKDIR);
 
-        inp->coda_mkdir.VFid = *dirfid;
+        inp->coda_mkdir.Fid= *dirfid;
         inp->coda_mkdir.attr = *attrs;
 	inp->coda_mkdir.name = offset;
         /* Venus must get null terminated string */
@@ -286,7 +286,7 @@
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
 
 	*attrs = outp->coda_mkdir.attr;
-	*newfid = outp->coda_mkdir.VFid;
+	*newfid = outp->coda_mkdir.Fid;
 
 	CODA_FREE(inp, insize);
 	return error;        
@@ -343,7 +343,7 @@
 	insize = max_t(unsigned int, offset + length + 1, OUTSIZE(create));
 	UPARG(CODA_CREATE);
 
-        inp->coda_create.VFid = *dirfid;
+        inp->coda_create.Fid= *dirfid;
         inp->coda_create.attr.va_mode = mode;
         inp->coda_create.attr.va_rdev = huge_encode_dev(rdev);
 	inp->coda_create.excl = excl;
@@ -357,7 +357,7 @@
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
 
 	*attrs = outp->coda_create.attr;
-	*newfid = outp->coda_create.VFid;
+	*newfid = outp->coda_create.Fid;
 
 	CODA_FREE(inp, insize);
 	return error;        
@@ -375,7 +375,7 @@
 	insize = max_t(unsigned int, offset + length + 1, OUTSIZE(rmdir));
 	UPARG(CODA_RMDIR);
 
-        inp->coda_rmdir.VFid = *dirfid;
+        inp->coda_rmdir.Fid= *dirfid;
         inp->coda_rmdir.name = offset;
         memcpy((char *)(inp) + offset, name, length);
 	*((char *)inp + offset + length) = '\0';
@@ -397,7 +397,7 @@
 	insize = max_t(unsigned int, offset + length + 1, OUTSIZE(remove));
 	UPARG(CODA_REMOVE);
 
-        inp->coda_remove.VFid = *dirfid;
+        inp->coda_remove.Fid= *dirfid;
         inp->coda_remove.name = offset;
         memcpy((char *)(inp) + offset, name, length);
 	*((char *)inp + offset + length) = '\0';
@@ -421,7 +421,7 @@
 		     INSIZE(readlink), OUTSIZE(readlink)+ *length + 1);
 	UPARG(CODA_READLINK);
 
-        inp->coda_readlink.VFid = *fid;
+        inp->coda_readlink.Fid= *fid;
     
         error =  coda_upcall(coda_sbp(sb), insize, &outsize, inp);
 	
@@ -481,7 +481,7 @@
 	UPARG(CODA_SYMLINK);
         
         /*        inp->coda_symlink.attr = *tva; XXXXXX */ 
-        inp->coda_symlink.VFid = *fid;
+        inp->coda_symlink.Fid= *fid;
 
 	/* Round up to word boundary and null terminate */
         inp->coda_symlink.srcname = offset;
@@ -511,7 +511,7 @@
 	insize=SIZE(fsync);
 	UPARG(CODA_FSYNC);
 
-        inp->coda_fsync.VFid = *fid;
+        inp->coda_fsync.Fid= *fid;
         error = coda_upcall(coda_sbp(sb), sizeof(union inputArgs), 
                             &outsize, inp);
 
@@ -528,7 +528,7 @@
 	insize = SIZE(access);
 	UPARG(CODA_ACCESS);
 
-        inp->coda_access.VFid = *fid;
+        inp->coda_access.Fid= *fid;
         inp->coda_access.flags = mask;
 
 	error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
@@ -555,26 +555,26 @@
 		goto exit;
         }
 
-        inp->coda_ioctl.VFid = *fid;
+        inp->coda_ioctl.Fid= *fid;
     
         /* the cmd field was mutated by increasing its size field to
          * reflect the path and follow args. We need to subtract that
          * out before sending the command to Venus.  */
         inp->coda_ioctl.cmd = (cmd & ~(PIOCPARM_MASK << 16));	
-        iocsize = ((cmd >> 16) & PIOCPARM_MASK) - sizeof(char *) - sizeof(int);
+        iocsize = ((cmd >> 16) & PIOCPARM_MASK) - sizeof(u_int64_t) - sizeof(int32_t);
         inp->coda_ioctl.cmd |= (iocsize & PIOCPARM_MASK) <<	16;	
-    
+	
         /* in->coda_ioctl.rwflag = flag; */
         inp->coda_ioctl.len = data->vi.in_size;
-        inp->coda_ioctl.data = (char *)(INSIZE(ioctl));
+        inp->coda_ioctl.data = CONV_U_INT64_T((INSIZE(ioctl)));
      
         /* get the data out of user space */
         if ( copy_from_user((char*)inp + (long)inp->coda_ioctl.data,
-			    data->vi.in, data->vi.in_size) ) {
+			    (char*)data->vi.in, data->vi.in_size) ) {
 		error = -EINVAL;
 	        goto exit;
 	}
-
+        
         error = coda_upcall(coda_sbp(sb), SIZE(ioctl) + data->vi.in_size,
                             &outsize, inp);
         
@@ -588,7 +588,7 @@
         if (outp->coda_ioctl.len > data->vi.out_size) {
 		error = -EINVAL;
         } else {
-		if (copy_to_user(data->vi.out, 
+		if (copy_to_user((char*)data->vi.out, 
 				 (char *)outp + (long)outp->coda_ioctl.data, 
 				 data->vi.out_size)) {
 			error = -EFAULT;
@@ -848,7 +848,7 @@
 
 	  case CODA_ZAPDIR : {
 	          struct inode *inode;
-		  struct CodaFid *fid = &out->coda_zapdir.CodaFid;
+		  struct CodaFid *fid = &out->coda_zapdir.Fid;
 
 		  inode = coda_fid_to_inode(fid, sb);
 		  if (inode) {
@@ -862,7 +862,7 @@
 
 	  case CODA_ZAPFILE : {
 	          struct inode *inode;
-		  struct CodaFid *fid = &out->coda_zapfile.CodaFid;
+		  struct CodaFid *fid = &out->coda_zapfile.Fid;
 		  inode = coda_fid_to_inode(fid, sb);
 		  if ( inode ) {
 	                  coda_flag_inode(inode, C_VATTR);
@@ -873,7 +873,7 @@
 
 	  case CODA_PURGEFID : {
 	          struct inode *inode;
-		  struct CodaFid *fid = &out->coda_purgefid.CodaFid;
+		  struct CodaFid *fid = &out->coda_purgefid.Fid;
 		  inode = coda_fid_to_inode(fid, sb);
 		  if ( inode ) { 
 			coda_flag_inode_children(inode, C_PURGE);
--- linux-2.6.8.1/include/linux/coda.h	2004-08-14 12:55:32.000000000 +0200
+++ linux-2.6.7.modified/include/linux/coda.h	2004-08-16 15:43:31.000000000 +0200
@@ -76,8 +76,8 @@
 typedef unsigned long u_long;
 typedef unsigned int u_int;
 typedef unsigned short u_short;
-typedef u_long ino_t;
-typedef u_long dev_t;
+typedef u_int64_t ino_t;
+typedef u_int64_t dev_t;
 typedef void * caddr_t;
 #ifdef DOS
 typedef unsigned __int64 u_quad_t;
@@ -130,6 +130,11 @@
 typedef unsigned int	   u_int32_t;
 #endif
 
+struct coda_timespec {
+        int32_t  tv_sec;         /* seconds */
+        int32_t    tv_nsec;        /* nanoseconds */
+};
+
 
 /*
  * Cfs constants
@@ -205,7 +210,7 @@
 	u_int32_t opaque[3];
 };
 
-static __inline__ ino_t  coda_f2i(struct CodaFid *fid)
+static __inline__ u_int32_t  coda_f2i(struct CodaFid *fid)
 {
 	if ( ! fid ) 
 		return 0; 
@@ -227,7 +232,7 @@
 };
 
 #define coda_f2i(fid)\
-	(fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
+	(fid ? ((fid)->opaque[3] ^ ((fid)->opaque[2]<<10) ^ ((fid)->opaque[1]<<20) ^ (fid)->opaque[0]) : 0)
 
 #endif
 
@@ -239,22 +244,22 @@
 enum coda_vtype	{ C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
 
 struct coda_vattr {
-	long     	va_type;	/* vnode type (for create) */
-	u_short		va_mode;	/* files access mode and type */
-	short		va_nlink;	/* number of references to file */
+	int32_t     	va_type;	/* vnode type (for create) */
+	u_int16_t		va_mode;	/* files access mode and type */
+	int16_t		va_nlink;	/* number of references to file */
 	vuid_t		va_uid;		/* owner user id */
-	vgid_t		va_gid;		/* owner group id */
-	long		va_fileid;	/* file id */
-	u_quad_t	va_size;	/* file size in bytes */
-	long		va_blocksize;	/* blocksize preferred for i/o */
-	struct timespec	va_atime;	/* time of last access */
-	struct timespec	va_mtime;	/* time of last modification */
-	struct timespec	va_ctime;	/* time file changed */
-	u_long		va_gen;		/* generation number of file */
-	u_long		va_flags;	/* flags defined for file */
-	cdev_t	        va_rdev;	/* device special file represents */
-	u_quad_t	va_bytes;	/* bytes of disk space held by file */
-	u_quad_t	va_filerev;	/* file modification number */
+	u_int32_t	va_gid;		/* owner group id */
+	int32_t		va_fileid;	/* file id */
+	u_int64_t	va_size;	/* file size in bytes */
+	int32_t		va_blocksize;	/* blocksize preferred for i/o */
+	struct coda_timespec	va_atime;	/* time of last access */
+	struct coda_timespec	va_mtime;	/* time of last modification */
+	struct coda_timespec	va_ctime;	/* time file changed */
+	u_int32_t	va_gen;		/* generation number of file */
+	u_int32_t	va_flags;	/* flags defined for file */
+	u_int64_t       va_rdev;	/* device special file represents */
+	u_int64_t	va_bytes;	/* bytes of disk space held by file */
+	u_int64_t	va_filerev;	/* file modification number */
 };
 
 #endif 
@@ -312,7 +317,7 @@
 #define VC_MAXMSGSIZE      sizeof(union inputArgs)+sizeof(union outputArgs) +\
                             VC_MAXDATASIZE  
 
-#define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
+#define CIOC_KERNEL_VERSION _IOWR('c', 10, u_int64_t)
 
 #if 0
 #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
@@ -352,7 +357,7 @@
 /* coda_root: NO_IN */
 struct coda_root_out {
     struct coda_out_hdr oh;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
 };
 
 struct coda_root_in {
@@ -362,21 +367,21 @@
 /* coda_open: */
 struct coda_open_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_open_out {
     struct coda_out_hdr oh;
-    cdev_t	dev;
-    ino_t	inode;
+    u_int64_t	dev;
+    u_int64_t	inode;
 };
 
 
 /* coda_store: */
 struct coda_store_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     int	flags;
 };
 
@@ -387,8 +392,8 @@
 /* coda_release: */
 struct coda_release_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_release_out {
@@ -398,8 +403,8 @@
 /* coda_close: */
 struct coda_close_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_close_out {
@@ -409,24 +414,24 @@
 /* coda_ioctl: */
 struct coda_ioctl_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	cmd;
-    int	len;
-    int	rwflag;
-    char *data;			/* Place holder for data. */
+    struct CodaFid Fid;
+    int32_t cmd;
+    int32_t len;
+    int32_t rwflag;
+    u_int64_t data;			/* Place holder for data. */
 };
 
 struct coda_ioctl_out {
     struct coda_out_hdr oh;
-    int	len;
-    caddr_t	data;		/* Place holder for data. */
+    int32_t len;
+    u_int64_t data;		/* Place holder for data. */
 };
 
 
 /* coda_getattr: */
 struct coda_getattr_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
 };
 
 struct coda_getattr_out {
@@ -438,7 +443,7 @@
 /* coda_setattr: NO_OUT */
 struct coda_setattr_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     struct coda_vattr attr;
 };
 
@@ -449,8 +454,8 @@
 /* coda_access: NO_OUT */
 struct coda_access_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_access_out {
@@ -465,31 +470,31 @@
 /* coda_lookup: */
 struct  coda_lookup_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int         name;		/* Place holder for data. */
-    int         flags;	
+    struct CodaFid Fid;
+    int32_t name;		/* Place holder for data. */
+    int32_t flags;	
 };
 
 struct coda_lookup_out {
     struct coda_out_hdr oh;
-    struct CodaFid VFid;
-    int	vtype;
+    struct CodaFid Fid;
+    int32_t vtype;
 };
 
 
 /* coda_create: */
 struct coda_create_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     struct coda_vattr attr;
-    int excl;
-    int mode;
-    int 	name;		/* Place holder for data. */
+    int32_t excl;
+    int32_t mode;
+    int32_t name;		/* Place holder for data. */
 };
 
 struct coda_create_out {
     struct coda_out_hdr oh;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     struct coda_vattr attr;
 };
 
@@ -497,8 +502,8 @@
 /* coda_remove: NO_OUT */
 struct coda_remove_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int name;		/* Place holder for data. */
+    struct CodaFid Fid;
+    int32_t name;		/* Place holder for data. */
 };
 
 struct coda_remove_out {
@@ -510,7 +515,7 @@
     struct coda_in_hdr ih;
     struct CodaFid sourceFid;	/* cnode to link *to* */
     struct CodaFid destFid;	/* Directory in which to place link */
-    int tname;		/* Place holder for data. */
+    int32_t tname;		/* Place holder for data. */
 };
 
 struct coda_link_out {
@@ -522,9 +527,9 @@
 struct coda_rename_in {
     struct coda_in_hdr ih;
     struct CodaFid sourceFid;
-    int 	srcname;
+    int32_t 	srcname;
     struct CodaFid destFid;
-    int 	destname;
+    int32_t 	destname;
 };
 
 struct coda_rename_out {
@@ -534,14 +539,14 @@
 /* coda_mkdir: */
 struct coda_mkdir_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     struct coda_vattr attr;
-    int	   name;		/* Place holder for data. */
+    int32_t name;		/* Place holder for data. */
 };
 
 struct coda_mkdir_out {
     struct coda_out_hdr oh;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
     struct coda_vattr attr;
 };
 
@@ -549,8 +554,8 @@
 /* coda_rmdir: NO_OUT */
 struct coda_rmdir_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int name;		/* Place holder for data. */
+    struct CodaFid Fid;
+    int32_t name;		/* Place holder for data. */
 };
 
 struct coda_rmdir_out {
@@ -560,10 +565,10 @@
 /* coda_symlink: NO_OUT */
 struct coda_symlink_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;	/* Directory to put symlink in */
-    int srcname;
+    struct CodaFid Fid;	/* Directory to put symlink in */
+    int32_t srcname;
     struct coda_vattr attr;
-    int tname;
+    int32_t tname;
 };
 
 struct coda_symlink_out {
@@ -573,20 +578,20 @@
 /* coda_readlink: */
 struct coda_readlink_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
 };
 
 struct coda_readlink_out {
     struct coda_out_hdr oh;
-    int	count;
-    caddr_t	data;		/* Place holder for data. */
+    int32_t count;
+    u_int64_t data;		/* Place holder for data. */
 };
 
 
 /* coda_fsync: NO_OUT */
 struct coda_fsync_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
 };
 
 struct coda_fsync_out {
@@ -596,13 +601,13 @@
 /* coda_vget: */
 struct coda_vget_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
+    struct CodaFid Fid;
 };
 
 struct coda_vget_out {
     struct coda_out_hdr oh;
-    struct CodaFid VFid;
-    int	vtype;
+    struct CodaFid Fid;
+    int32_t vtype;
 };
 
 
@@ -625,21 +630,21 @@
 /* CODA_ZAPFILE is a venus->kernel call */
 struct coda_zapfile_out {  
     struct coda_out_hdr oh;
-    struct CodaFid CodaFid;
+    struct CodaFid Fid;
 };
 
 /* coda_zapdir: */
 /* CODA_ZAPDIR is a venus->kernel call */	
 struct coda_zapdir_out {	  
     struct coda_out_hdr oh;
-    struct CodaFid CodaFid;
+    struct CodaFid Fid;
 };
 
 /* coda_purgefid: */
 /* CODA_PURGEFID is a venus->kernel call */	
 struct coda_purgefid_out { 
     struct coda_out_hdr oh;
-    struct CodaFid CodaFid;
+    struct CodaFid Fid;
 };
 
 /* coda_replace: */
@@ -653,13 +658,13 @@
 /* coda_open_by_fd: */
 struct coda_open_by_fd_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int        flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_open_by_fd_out {
     struct coda_out_hdr oh;
-    int fd;
+    int32_t fd;
 
 #ifdef __KERNEL__
     struct file *fh; /* not passed from userspace but used in-kernel only */
@@ -669,13 +674,13 @@
 /* coda_open_by_path: */
 struct coda_open_by_path_in {
     struct coda_in_hdr ih;
-    struct CodaFid VFid;
-    int	flags;
+    struct CodaFid Fid;
+    int32_t flags;
 };
 
 struct coda_open_by_path_out {
     struct coda_out_hdr oh;
-	int path;
+    int32_t path;
 };
 
 /* coda_statfs: NO_IN */
@@ -758,16 +763,22 @@
  */
 
 #define PIOCPARM_MASK 0x0000ffff
+
+// convert 32-bit pointers etc. safely to u_int64_t - is there a better way to do that?
+#define CONV_U_INT64_T(arg) ((((u_int64_t) arg) << ((sizeof(u_int64_t) - sizeof(arg)) * 8)) \
+		>> ((sizeof(u_int64_t) - sizeof(arg)) * 8))
+	
 struct ViceIoctl {
-        void __user *in;        /* Data to be transferred in */
-        void __user *out;       /* Data to be transferred out */
-        short in_size;          /* Size of input buffer <= 2K */
-        short out_size;         /* Maximum size of output buffer, <= 2K */
+        u_int64_t in;        /* Data to be transferred in */
+        u_int64_t out;       /* Data to be transferred out */
+        int16_t in_size;          /* Size of input buffer <= 2K */
+        int16_t out_size;         /* Maximum size of output buffer, <= 2K */
 };
 
 struct PioctlData {
-        const char __user *path;
-        int follow;
+        u_int64_t path;
+	//const char __user *path;
+        int32_t follow;
         struct ViceIoctl vi;
 };
 
@@ -780,8 +791,8 @@
 #define CODA_MOUNT_VERSION 1
 
 struct coda_mount_data {
-	int		version;
-	int		fd;       /* Opened device */
+	int32_t version;
+	int32_t fd;       /* Opened device */
 };
 
 #endif 
