summaryrefslogtreecommitdiff
path: root/nfs/nfs.c
diff options
context:
space:
mode:
authorMichael Kelly <mike@weatherwax.co.uk>2025-07-10 18:34:21 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-10 18:37:03 +0200
commitcdedbc4b018212f60e7e64b9696d6a7641281452 (patch)
tree4cda3e60748a98902f733046539938230557b753 /nfs/nfs.c
parent3df101ed0d44b7f22d18890973fe400cb2551d73 (diff)
nfs: Fix xdr_decode_fattr decoding for v3
Diffstat (limited to 'nfs/nfs.c')
-rw-r--r--nfs/nfs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nfs/nfs.c b/nfs/nfs.c
index 7ec08eaa..cd377ff2 100644
--- a/nfs/nfs.c
+++ b/nfs/nfs.c
@@ -453,6 +453,10 @@ xdr_decode_fattr (int *p, struct stat *st)
p++;
st->st_blocks = ntohl (*p);
p++;
+ st->st_fsid = ntohl (*p);
+ p++;
+ st->st_ino = ntohl (*p);
+ p++;
}
else
{
@@ -468,11 +472,9 @@ xdr_decode_fattr (int *p, struct stat *st)
minor = ntohl (*p);
p++;
st->st_rdev = gnu_dev_makedev (major, minor);
+ p = xdr_decode_64bit(p, &st->st_fsid);
+ p = xdr_decode_64bit(p, &st->st_ino);
}
- st->st_fsid = ntohl (*p);
- p++;
- st->st_ino = ntohl (*p);
- p++;
st->st_atim.tv_sec = ntohl (*p);
p++;
st->st_atim.tv_nsec = ntohl (*p);