From 63ed56840692629ee9853b6ce349a9c1ca0c96e9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 13 Nov 2007 23:27:07 +0000 Subject: 2007-11-13 Thomas Schwinge * ops.c (complete_setattr): Adapt to ``struct stat'' changes. * xdr.c (encode_fattr): Likewise. --- nfsd/ChangeLog | 5 +++++ nfsd/ops.c | 20 +++++++++++--------- nfsd/xdr.c | 16 +++++++++------- 3 files changed, 25 insertions(+), 16 deletions(-) (limited to 'nfsd') diff --git a/nfsd/ChangeLog b/nfsd/ChangeLog index b0da0207..3e04e728 100644 --- a/nfsd/ChangeLog +++ b/nfsd/ChangeLog @@ -1,3 +1,8 @@ +2007-11-13 Thomas Schwinge + + * ops.c (complete_setattr): Adapt to ``struct stat'' changes. + * xdr.c (encode_fattr): Likewise. + 2006-03-15 Thomas Schwinge * loop.c (server_loop): Fix invalid lvalues. diff --git a/nfsd/ops.c b/nfsd/ops.c index 12f08cce..d503290e 100644 --- a/nfsd/ops.c +++ b/nfsd/ops.c @@ -1,5 +1,7 @@ /* ops.c NFS daemon protocol operations. - Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc. + + Copyright (C) 1996, 2001, 2002, 2007 Free Software Foundation, Inc. + Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -104,18 +106,18 @@ complete_setattr (mach_port_t port, mtime.microseconds = 0; if (atime.seconds == -1) - atime.seconds = st.st_atime; + atime.seconds = st.st_atim.tv_sec; if (atime.microseconds == -1) - atime.microseconds = st.st_atime_usec; + atime.microseconds = st.st_atim.tv_nsec / 1000; if (mtime.seconds == -1) - mtime.seconds = st.st_mtime; + mtime.seconds = st.st_mtim.tv_sec; if (mtime.microseconds == -1) - mtime.microseconds = st.st_mtime_usec; + mtime.microseconds = st.st_mtim.tv_nsec / 1000; - if (atime.seconds != st.st_atime - || atime.microseconds != st.st_atime_usec - || mtime.seconds != st.st_mtime - || mtime.microseconds != st.st_mtime_usec) + if (atime.seconds != st.st_atim.tv_sec + || atime.microseconds != st.st_atim.tv_nsec / 1000 + || mtime.seconds != st.st_mtim.tv_sec + || mtime.microseconds != st.st_mtim.tv_nsec / 1000) err = file_utimes (port, atime, mtime); return err; diff --git a/nfsd/xdr.c b/nfsd/xdr.c index 4c7c2a72..1ff77851 100644 --- a/nfsd/xdr.c +++ b/nfsd/xdr.c @@ -1,5 +1,7 @@ /* xdr.c - XDR packing and unpacking in nfsd. - Copyright (C) 1996, 2002 Free Software Foundation, Inc. + + Copyright (C) 1996, 2002, 2007 Free Software Foundation, Inc. + Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -76,12 +78,12 @@ encode_fattr (int *p, struct stat *st, int version) *(p++) = htonl (st->st_blocks); *(p++) = htonl (st->st_fsid); *(p++) = htonl (st->st_ino); - *(p++) = htonl (st->st_atime); - *(p++) = htonl (st->st_atime_usec); - *(p++) = htonl (st->st_mtime); - *(p++) = htonl (st->st_mtime_usec); - *(p++) = htonl (st->st_ctime); - *(p++) = htonl (st->st_ctime_usec); + *(p++) = htonl (st->st_atim.tv_sec); + *(p++) = htonl (st->st_atim.tv_nsec / 1000); + *(p++) = htonl (st->st_mtim.tv_sec); + *(p++) = htonl (st->st_mtim.tv_nsec / 1000); + *(p++) = htonl (st->st_ctim.tv_sec); + *(p++) = htonl (st->st_ctim.tv_nsec / 1000); return p; } -- cgit v1.2.3