From owner-p4-projects@FreeBSD.ORG Tue Oct 18 13:09:26 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E466816A421; Tue, 18 Oct 2005 13:09:25 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E51B16A41F for ; Tue, 18 Oct 2005 13:09:25 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6435B43D46 for ; Tue, 18 Oct 2005 13:09:25 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9ID9PQJ075980 for ; Tue, 18 Oct 2005 13:09:25 GMT (envelope-from soc-chenk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9ID9Pjc075977 for perforce@freebsd.org; Tue, 18 Oct 2005 13:09:25 GMT (envelope-from soc-chenk@freebsd.org) Date: Tue, 18 Oct 2005 13:09:25 GMT Message-Id: <200510181309.j9ID9Pjc075977@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-chenk@freebsd.org using -f From: soc-chenk To: Perforce Change Reviews Cc: Subject: PERFORCE change 85493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 13:09:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=85493 Change 85493 by soc-chenk@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) */