Deleted Added
full compact
nfs_subs.c (235626) nfs_subs.c (247502)
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: stable/9/sys/nfsclient/nfs_subs.c 235626 2012-05-18 19:48:38Z mckusick $");
36__FBSDID("$FreeBSD: stable/9/sys/nfsclient/nfs_subs.c 247502 2013-02-28 21:57:38Z jhb $");
37
38/*
39 * These functions support the macros and help fiddle mbuf chains for
40 * the nfs op functions. They do things like create the rpc header and
41 * copy data between mbuf chains and uio lists.
42 */
43
44#include "opt_kdtrace.h"

--- 1060 unchanged lines hidden (view full) ---

1105 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1106 *tl++ = nfs_true;
1107 txdr_hyper(va->va_size, tl);
1108 } else {
1109 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1110 *tl = nfs_false;
1111 }
1112 if (va->va_atime.tv_sec != VNOVAL) {
37
38/*
39 * These functions support the macros and help fiddle mbuf chains for
40 * the nfs op functions. They do things like create the rpc header and
41 * copy data between mbuf chains and uio lists.
42 */
43
44#include "opt_kdtrace.h"

--- 1060 unchanged lines hidden (view full) ---

1105 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1106 *tl++ = nfs_true;
1107 txdr_hyper(va->va_size, tl);
1108 } else {
1109 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1110 *tl = nfs_false;
1111 }
1112 if (va->va_atime.tv_sec != VNOVAL) {
1113 if (va->va_atime.tv_sec != time_second) {
1113 if ((va->va_vaflags & VA_UTIMES_NULL) == 0) {
1114 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1115 *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
1116 txdr_nfsv3time(&va->va_atime, tl);
1117 } else {
1118 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1119 *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
1120 }
1121 } else {
1122 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1123 *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
1124 }
1125 if (va->va_mtime.tv_sec != VNOVAL) {
1114 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1115 *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
1116 txdr_nfsv3time(&va->va_atime, tl);
1117 } else {
1118 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1119 *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
1120 }
1121 } else {
1122 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1123 *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
1124 }
1125 if (va->va_mtime.tv_sec != VNOVAL) {
1126 if (va->va_mtime.tv_sec != time_second) {
1126 if ((va->va_vaflags & VA_UTIMES_NULL) == 0) {
1127 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1128 *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
1129 txdr_nfsv3time(&va->va_mtime, tl);
1130 } else {
1131 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1132 *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
1133 }
1134 } else {
1135 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1136 *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
1137 }
1138}
1127 tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos);
1128 *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
1129 txdr_nfsv3time(&va->va_mtime, tl);
1130 } else {
1131 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1132 *tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
1133 }
1134 } else {
1135 tl = nfsm_build_xx(NFSX_UNSIGNED, mb, bpos);
1136 *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
1137 }
1138}