summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-31 00:27:38 +0000
committerMiles Bader <miles@gnu.org>1996-10-31 00:27:38 +0000
commit13fb5bcb8a052c6779ad4c8b09b9d645664736f3 (patch)
tree25e49516053c53460f12026f927886d6c89162a3
parent0fa7e66b72b0a9fc64ac8c6edfed3e363d11d176 (diff)
(netfs_attempt_statfs):
Convert incoming numbers from network to host byte order. Don't convert sizes from IOSIZE to BSIZE units. Return BSIZE in f_bsize field, not IOSIZE. Fill in f_fsid field.
-rw-r--r--nfs/ops.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index 4e4f2930..eb8cacca 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -346,18 +346,15 @@ netfs_attempt_statfs (struct netcred *cred, struct node *np,
if (!err)
{
- long iosize, bsize;
- iosize = *p++;
- bsize = *p++;
- st->f_bsize = iosize;
- st->f_blocks = ((*p++) * bsize) / iosize;
- st->f_bfree = ((*p++) * bsize) / iosize;
- st->f_bavail = ((*p++) * bsize) / iosize;
-
+ p++; /* skip IOSIZE field */
+ st->f_bsize = ntohl (*p++);
+ st->f_blocks = ntohl (*p++);
+ st->f_bfree = ntohl (*p++);
+ st->f_bavail = ntohl (*p++);
st->f_type = FSTYPE_NFS;
st->f_files = 0;
st->f_ffree = 0;
- st->f_fsid = 0; /* XXX wrong */
+ st->f_fsid = getpid ();
st->f_namelen = 0;
}