Deleted Added
full compact
nfsm_subs.h (22975) nfsm_subs.h (27446)
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

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfsm_subs.h 8.2 (Berkeley) 3/30/95
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

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfsm_subs.h 8.2 (Berkeley) 3/30/95
37 * $Id$
37 * $Id: nfsm_subs.h,v 1.12 1997/02/22 09:42:48 peter Exp $
38 */
39
40
41#ifndef _NFS_NFSM_SUBS_H_
42#define _NFS_NFSM_SUBS_H_
43
44
45/*

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

358 dpos += (s); \
359 } else if (t1 = nfs_adv(&md, &dpos, (s), t1)) { \
360 error = t1; \
361 m_freem(mrep); \
362 goto nfsmout; \
363 } }
364
365#define nfsm_srvmtofh(f) \
38 */
39
40
41#ifndef _NFS_NFSM_SUBS_H_
42#define _NFS_NFSM_SUBS_H_
43
44
45/*

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

358 dpos += (s); \
359 } else if (t1 = nfs_adv(&md, &dpos, (s), t1)) { \
360 error = t1; \
361 m_freem(mrep); \
362 goto nfsmout; \
363 } }
364
365#define nfsm_srvmtofh(f) \
366 { if (nfsd->nd_flag & ND_NFSV3) { \
366 { int fhlen = NFSX_V3FH; \
367 if (nfsd->nd_flag & ND_NFSV3) { \
367 nfsm_dissect(tl, u_long *, NFSX_UNSIGNED); \
368 nfsm_dissect(tl, u_long *, NFSX_UNSIGNED); \
368 if (fxdr_unsigned(int, *tl) != NFSX_V3FH) { \
369 fhlen = fxdr_unsigned(int, *tl); \
370 if (fhlen == 0) { \
371 bzero((caddr_t)(f), NFSX_V3FH); \
372 } else if (fhlen != NFSX_V3FH) { \
369 error = EBADRPC; \
370 nfsm_reply(0); \
371 } \
372 } \
373 error = EBADRPC; \
374 nfsm_reply(0); \
375 } \
376 } \
373 nfsm_dissect(tl, u_long *, NFSX_V3FH); \
374 bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \
375 if ((nfsd->nd_flag & ND_NFSV3) == 0) \
376 nfsm_adv(NFSX_V2FH - NFSX_V3FH); \
377 }
377 if (fhlen != 0) { \
378 nfsm_dissect(tl, u_long *, NFSX_V3FH); \
379 bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \
380 if ((nfsd->nd_flag & ND_NFSV3) == 0) \
381 nfsm_adv(NFSX_V2FH - NFSX_V3FH); \
382 } \
383 }
378
379#define nfsm_clget \
380 if (bp >= be) { \
381 if (mp == mb) \
382 mp->m_len += bp-bpos; \
383 MGET(mp, M_WAIT, MT_DATA); \
384 MCLGET(mp, M_WAIT); \
385 mp->m_len = NFSMSIZ(mp); \

--- 61 unchanged lines hidden ---
384
385#define nfsm_clget \
386 if (bp >= be) { \
387 if (mp == mb) \
388 mp->m_len += bp-bpos; \
389 MGET(mp, M_WAIT, MT_DATA); \
390 MCLGET(mp, M_WAIT); \
391 mp->m_len = NFSMSIZ(mp); \

--- 61 unchanged lines hidden ---