summaryrefslogtreecommitdiff
path: root/nfsd
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:27:07 +0000
committerThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:27:07 +0000
commit63ed56840692629ee9853b6ce349a9c1ca0c96e9 (patch)
treee3e9c9f915699579e370e587657f111a65182b65 /nfsd
parentada287b189c35ff3b4737af1e857179a7cc6fa49 (diff)
2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
* ops.c (complete_setattr): Adapt to ``struct stat'' changes. * xdr.c (encode_fattr): Likewise.
Diffstat (limited to 'nfsd')
-rw-r--r--nfsd/ChangeLog5
-rw-r--r--nfsd/ops.c20
-rw-r--r--nfsd/xdr.c16
3 files changed, 25 insertions, 16 deletions
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 <tschwinge@gnu.org>
+
+ * ops.c (complete_setattr): Adapt to ``struct stat'' changes.
+ * xdr.c (encode_fattr): Likewise.
+
2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
* 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;
}