Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 02:54:44 +0000 (UTC)
From:      Davide Italiano <davide@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242384 - head/sys/fs/smbfs
Message-ID:  <201210310254.q9V2sibf032638@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davide
Date: Wed Oct 31 02:54:44 2012
New Revision: 242384
URL: http://svn.freebsd.org/changeset/base/242384

Log:
  Change the code to use %jd as printf() placeholder for uio_offset and
  cast to intmax_t.
  
  Suggested by:	pjd
  Sponsored by:	iXsystems inc.

Modified:
  head/sys/fs/smbfs/smbfs_io.c
  head/sys/fs/smbfs/smbfs_vnops.c

Modified: head/sys/fs/smbfs/smbfs_io.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_io.c	Tue Oct 30 22:30:30 2012	(r242383)
+++ head/sys/fs/smbfs/smbfs_io.c	Wed Oct 31 02:54:44 2012	(r242384)
@@ -241,7 +241,8 @@ smbfs_writevnode(struct vnode *vp, struc
 		SMBERROR("vn types other than VREG unsupported !\n");
 		return EIO;
 	}
-	SMBVDEBUG("ofs=%d,resid=%zd\n",(int)uiop->uio_offset, uiop->uio_resid);
+	SMBVDEBUG("ofs=%jd,resid=%zd\n", (intmax_t)uiop->uio_offset, 
+	    uiop->uio_resid);
 	if (uiop->uio_offset < 0)
 		return EINVAL;
 /*	if (uiop->uio_offset + uiop->uio_resid > smp->nm_maxfilesize)
@@ -274,7 +275,8 @@ smbfs_writevnode(struct vnode *vp, struc
 
 	smb_makescred(&scred, td, cred);
 	error = smb_write(smp->sm_share, np->n_fid, uiop, &scred);
-	SMBVDEBUG("after: ofs=%d,resid=%zd\n",(int)uiop->uio_offset, uiop->uio_resid);
+	SMBVDEBUG("after: ofs=%jd,resid=%zd\n", (intmax_t)uiop->uio_offset, 
+	    uiop->uio_resid);
 	if (!error) {
 		if (uiop->uio_offset > np->n_size) {
 			np->n_size = uiop->uio_offset;
@@ -601,7 +603,8 @@ smbfs_putpages(ap)
 	uio.uio_segflg = UIO_SYSSPACE;
 	uio.uio_rw = UIO_WRITE;
 	uio.uio_td = td;
-	SMBVDEBUG("ofs=%d,resid=%zd\n",(int)uio.uio_offset, uio.uio_resid);
+	SMBVDEBUG("ofs=%jd,resid=%zd\n", (intmax_t)uio.uio_offset, 
+	    uio.uio_resid);
 
 	smb_makescred(&scred, td, cred);
 	error = smb_write(smp->sm_share, np->n_fid, &uio, &scred);

Modified: head/sys/fs/smbfs/smbfs_vnops.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_vnops.c	Tue Oct 30 22:30:30 2012	(r242383)
+++ head/sys/fs/smbfs/smbfs_vnops.c	Wed Oct 31 02:54:44 2012	(r242384)
@@ -452,7 +452,7 @@ smbfs_write(ap)
 	struct vnode *vp = ap->a_vp;
 	struct uio *uio = ap->a_uio;
 
-	SMBVDEBUG("%d,ofs=%d,sz=%zd\n",vp->v_type, (int)uio->uio_offset, 
+	SMBVDEBUG("%d,ofs=%jd,sz=%zd\n",vp->v_type, (intmax_t)uio->uio_offset, 
 	    uio->uio_resid);
 	if (vp->v_type != VREG)
 		return (EPERM);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210310254.q9V2sibf032638>