Index: nfs_vfsops.c =================================================================== RCS file: /private/FreeBSD/src/sys/nfsclient/nfs_vfsops.c,v retrieving revision 1.145 diff -u -p -r1.145 nfs_vfsops.c --- nfs_vfsops.c 22 Nov 2003 02:21:49 -0000 1.145 +++ nfs_vfsops.c 17 Feb 2004 13:27:42 -0000 @@ -233,7 +233,7 @@ nfs_statfs(struct mount *mp, struct stat int error = 0, v3 = (nmp->nm_flag & NFSMNT_NFSV3), retattr; struct mbuf *mreq, *mrep, *md, *mb; struct nfsnode *np; - u_quad_t tquad; + off_t toff; int bsize; #ifndef nolint @@ -264,21 +264,21 @@ nfs_statfs(struct mount *mp, struct stat if (v3) { for (bsize = NFS_FABLKSIZE; ; bsize *= 2) { sbp->f_bsize = bsize; - tquad = fxdr_hyper(&sfp->sf_tbytes); - if (((long)(tquad / bsize) > LONG_MAX) || - ((long)(tquad / bsize) < LONG_MIN)) + toff = (intmax_t)fxdr_hyper(&sfp->sf_tbytes) / bsize; + if (toff > (intmax_t)LONG_MAX || + toff < (intmax_t)LONG_MIN) continue; - sbp->f_blocks = tquad / bsize; - tquad = fxdr_hyper(&sfp->sf_fbytes); - if (((long)(tquad / bsize) > LONG_MAX) || - ((long)(tquad / bsize) < LONG_MIN)) + sbp->f_blocks = toff; + toff = (intmax_t)fxdr_hyper(&sfp->sf_fbytes) / bsize; + if (toff > (intmax_t)LONG_MAX || + toff < (intmax_t)LONG_MIN) continue; - sbp->f_bfree = tquad / bsize; - tquad = fxdr_hyper(&sfp->sf_abytes); - if (((long)(tquad / bsize) > LONG_MAX) || - ((long)(tquad / bsize) < LONG_MIN)) + sbp->f_bfree = toff; + toff = (intmax_t)fxdr_hyper(&sfp->sf_abytes) / bsize; + if (toff > (intmax_t)LONG_MAX || + toff < (intmax_t)LONG_MIN) continue; - sbp->f_bavail = tquad / bsize; + sbp->f_bavail = toff; sbp->f_files = (fxdr_unsigned(int32_t, sfp->sf_tfiles.nfsuquad[1]) & 0x7fffffff); sbp->f_ffree = (fxdr_unsigned(int32_t,