PERFORCE change 85493 for review

soc-chenk soc-chenk at FreeBSD.org
Tue Oct 18 06:09:26 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=85493

Change 85493 by soc-chenk at soc-chenk_leavemealone on 2005/10/18 13:09:00

	Attempt to fix machine dependency issues
	Submitted by:	soc-chenk

Affected files ...

.. //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.c#21 edit
.. //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.h#11 edit

Differences ...

==== //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.c#21 (text+ko) ====

@@ -728,7 +728,7 @@
 
 	DEBUG("op %s (#%d) was sent to us with a body of size %d\n",
  (0 <= opcode && opcode <= fuse_opnames_entries) ? fuse_opnames[opcode] : "???",
- opcode, blen);
+ opcode, (int)blen);
 
 	switch (opcode) {
 	case FUSE_LOOKUP:
@@ -1701,7 +1701,8 @@
 fuse_mount(struct mount *mp, struct thread *td)
 {
 	int err = 0;
-	int len;
+	int typelen = 0;
+	size_t len;
 	char *fspec;
 	struct vnode *devvp;
 	struct vfsoptlist *opts;
@@ -1742,9 +1743,9 @@
 
 	/* `from' contains the device name (eg. /dev/fuse0); REQUIRED */
 	fspec = NULL;
-	if ((err = vfs_getopt(opts, "from", (void **)&fspec, &len)))
+	if ((err = vfs_getopt(opts, "from", (void **)&fspec, &typelen)))
 		return (err);
-	if (!fspec || fspec[len - 1] != '\0')
+	if (!fspec || fspec[typelen - 1] != '\0')
 		return (EINVAL);
 
 	mp->mnt_data = NULL;
@@ -1923,6 +1924,7 @@
 	vfs_getnewfsid(mp);	
 	mp->mnt_flag |= MNT_LOCAL;
 
+	len = typelen;
 	copystr(fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &len);
 	if (fmnt->mntopts & FUSEFS_SECONDARY && len >= 1) {
 		/*
@@ -3501,8 +3503,8 @@
 		if ((err = fdisp_wait_answ(&fdi)))
 			goto out;
 	
-		DEBUG2G("%d bytes asked for from offset %lld, passing on the %d we got\n",
-		        uio->uio_resid, uio->uio_offset, fdi.iosize);
+		DEBUG2G("%d bytes asked for from offset %d, passing on the %d we got\n",
+		        uio->uio_resid, (int)uio->uio_offset, (int)fdi.iosize);
 
 		if ((err = buffe(uio, fri->size, fdi.answ, fdi.iosize, param)))
 			break;
@@ -3737,7 +3739,7 @@
 
 	cookediov = param;
 
-	DEBUG2G("entering loop with bufsize %d\n", bufsize);
+	DEBUG2G("entering loop with bufsize %d\n", (int)bufsize);
 
 	/*
 	 * Can we avoid infite loops? An infinite loop could occur only if we
@@ -3766,7 +3768,7 @@
 		fudge = (struct fuse_dirent *)buf;
 		freclen = FUSE_DIRENT_SIZE(fudge);
 
-		DEBUG("bufsize %d, freclen %d\n", bufsize, freclen);
+		DEBUG("bufsize %d, freclen %d\n", (int)bufsize, (int)freclen);
 
 		/*
 		 * Here is an exit condition: we terminate the whole reading
@@ -4662,7 +4664,7 @@
 	int n, on, err = 0;
 	int64_t fsize = vp->v_object->un_pager.vnp.vnp_size;
 
-	DEBUG2G("fsize %lld\n", fsize); 
+	DEBUG2G("fsize %lld\n", (long long int)fsize); 
 
 	biosize = vp->v_mount->mnt_stat.f_iosize;
 	/*
@@ -5019,8 +5021,8 @@
 			bp->b_resid -= respsize;
 			bufdat += respsize;
 
-			DEBUG2G("%d bytes asked for from offset %lld, passing on the %d we got\n",
-			        chunksize, fri->offset, respsize);
+			DEBUG2G("%d bytes asked for from offset %llu, passing on the %d we got\n",
+			        chunksize, (long long unsigned)fri->offset, respsize);
 	
 			if (respsize < chunksize) {
 #if ZERO_PAD_INCOMPLETE_BUFS

==== //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.h#11 (text+ko) ====

@@ -136,7 +136,7 @@
 #define FUSE_ROOT_INODE 1   /* Fuse convention: node id of root node is 1 */
 
 #define VTOI(vp) ((struct fuse_vnode_data *)(vp)->v_data)->nid
-#define VTOI32(vp) (uint64_t)(vp)->v_hash
+#define VTOI32(vp) (unsigned long long)(vp)->v_hash
 
 /** Max number of pages that can be used in a single read request */
 /* (taken from Linux Fuse) */


More information about the p4-projects mailing list