From 13fb5bcb8a052c6779ad4c8b09b9d645664736f3 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 31 Oct 1996 00:27:38 +0000 Subject: (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. --- nfs/ops.c | 15 ++++++--------- 1 file 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; } -- cgit v1.2.3