diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-03-16 19:42:58 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-03-16 19:42:58 +0000 |
commit | d4545e818f0707235e329a03a45dae9d48d70808 (patch) | |
tree | 31f7d6172379994f72e216732c09176657d6ddb1 /sys/nfs/nfs_serv.c | |
parent | 84746867a9863df603adc37bc169855703df4c5b (diff) |
Widen some struct statfs fields to support large filesystem stata
and add some to be able to support statvfs(2). Do the compat dance
to provide backward compatibility. ok thib@ miod@
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r-- | sys/nfs/nfs_serv.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 53de291d927..c545fba06ba 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.48 2008/01/06 17:38:23 blambert Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.49 2008/03/16 19:42:57 otto Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -3061,12 +3061,11 @@ nfsrv_statfs(nfsd, slp, procp, mrq) tval = (u_quad_t)sf->f_bavail; tval *= (u_quad_t)sf->f_bsize; txdr_hyper(tval, &sfp->sf_abytes); - sfp->sf_tfiles.nfsuquad[0] = 0; - sfp->sf_tfiles.nfsuquad[1] = txdr_unsigned(sf->f_files); - sfp->sf_ffiles.nfsuquad[0] = 0; - sfp->sf_ffiles.nfsuquad[1] = txdr_unsigned(sf->f_ffree); - sfp->sf_afiles.nfsuquad[0] = 0; - sfp->sf_afiles.nfsuquad[1] = txdr_unsigned(sf->f_ffree); + tval = (u_quad_t)sf->f_files; + txdr_hyper(tval, &sfp->sf_tfiles); + tval = (u_quad_t)sf->f_ffree; + txdr_hyper(tval, &sfp->sf_ffiles); + txdr_hyper(tval, &sfp->sf_afiles); sfp->sf_invarsec = 0; } else { sfp->sf_tsize = txdr_unsigned(NFS_MAXDGRAMDATA); |