summaryrefslogtreecommitdiffstats
path: root/sys/nfs/xdr_subs.h
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-09-19 18:21:32 +0000
committernate <nate@FreeBSD.org>1996-09-19 18:21:32 +0000
commit45c85d421d05f7b96a102826ea41b4f7dc31c017 (patch)
tree0cf0ba5fc468e2333547b81142b3e6682d895b1d /sys/nfs/xdr_subs.h
parent43f6021163b3ac1fd5741353fb84010eb75b0cc0 (diff)
downloadFreeBSD-src-45c85d421d05f7b96a102826ea41b4f7dc31c017.zip
FreeBSD-src-45c85d421d05f7b96a102826ea41b4f7dc31c017.tar.gz
In sys/time.h, struct timespec is defined as:
/* * Structure defined by POSIX.4 to be like a timeval. */ struct timespec { time_t ts_sec; /* seconds */ long ts_nsec; /* and nanoseconds */ }; The correct names of the fields are tv_sec and tv_nsec. Reminded by: James Drobina <jdrobina@infinet.com>
Diffstat (limited to 'sys/nfs/xdr_subs.h')
-rw-r--r--sys/nfs/xdr_subs.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/nfs/xdr_subs.h b/sys/nfs/xdr_subs.h
index e8c3636..26a0969 100644
--- a/sys/nfs/xdr_subs.h
+++ b/sys/nfs/xdr_subs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)xdr_subs.h 8.1 (Berkeley) 6/10/93
- * $Id: xdr_subs.h,v 1.4 1995/01/10 13:11:42 davidg Exp $
+ * $Id: xdr_subs.h,v 1.5 1995/06/27 11:07:03 dfr Exp $
*/
#ifndef _NFS_XDR_SUBS_H_
@@ -55,27 +55,27 @@
#define txdr_unsigned(v) (htonl((long)(v)))
#define fxdr_nfsv2time(f, t) { \
- (t)->ts_sec = ntohl(((struct nfsv2_time *)(f))->nfsv2_sec); \
+ (t)->tv_sec = ntohl(((struct nfsv2_time *)(f))->nfsv2_sec); \
if (((struct nfsv2_time *)(f))->nfsv2_usec != 0xffffffff) \
- (t)->ts_nsec = 1000 * ntohl(((struct nfsv2_time *)(f))->nfsv2_usec); \
+ (t)->tv_nsec = 1000 * ntohl(((struct nfsv2_time *)(f))->nfsv2_usec); \
else \
- (t)->ts_nsec = 0; \
+ (t)->tv_nsec = 0; \
}
#define txdr_nfsv2time(f, t) { \
- ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->ts_sec); \
- if ((f)->ts_nsec != -1) \
- ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->ts_nsec / 1000); \
+ ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->tv_sec); \
+ if ((f)->tv_nsec != -1) \
+ ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->tv_nsec / 1000); \
else \
((struct nfsv2_time *)(t))->nfsv2_usec = 0xffffffff; \
}
#define fxdr_nfsv3time(f, t) { \
- (t)->ts_sec = ntohl(((struct nfsv3_time *)(f))->nfsv3_sec); \
- (t)->ts_nsec = ntohl(((struct nfsv3_time *)(f))->nfsv3_nsec); \
+ (t)->tv_sec = ntohl(((struct nfsv3_time *)(f))->nfsv3_sec); \
+ (t)->tv_nsec = ntohl(((struct nfsv3_time *)(f))->nfsv3_nsec); \
}
#define txdr_nfsv3time(f, t) { \
- ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->ts_sec); \
- ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->ts_nsec); \
+ ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->tv_sec); \
+ ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \
}
#define fxdr_hyper(f, t) { \
OpenPOWER on IntegriCloud