Deleted Added
full compact
nfs_common.c (104908) nfs_common.c (109623)
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

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

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 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
37 */
38
39#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

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

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 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
37 */
38
39#include <sys/cdefs.h>
40__FBSDID("$FreeBSD: head/sys/nfs/nfs_common.c 104908 2002-10-11 14:58:34Z mike $");
40__FBSDID("$FreeBSD: head/sys/nfs/nfs_common.c 109623 2003-01-21 08:56:16Z alfred $");
41
42/*
43 * These functions support the macros and help fiddle mbuf chains for
44 * the nfs op functions. They do things like create the rpc header and
45 * copy data between mbuf chains and uio lists.
46 */
47
48#include <sys/param.h>

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

186 if (left >= siz) {
187 ret = *dposp;
188 *dposp += siz;
189 } else if (mp->m_next == NULL) {
190 return NULL;
191 } else if (siz > MHLEN) {
192 panic("nfs S too big");
193 } else {
41
42/*
43 * These functions support the macros and help fiddle mbuf chains for
44 * the nfs op functions. They do things like create the rpc header and
45 * copy data between mbuf chains and uio lists.
46 */
47
48#include <sys/param.h>

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

186 if (left >= siz) {
187 ret = *dposp;
188 *dposp += siz;
189 } else if (mp->m_next == NULL) {
190 return NULL;
191 } else if (siz > MHLEN) {
192 panic("nfs S too big");
193 } else {
194 MGET(mp2, M_TRYWAIT, MT_DATA);
194 MGET(mp2, 0, MT_DATA);
195 mp2->m_next = mp->m_next;
196 mp->m_next = mp2;
197 mp->m_len -= left;
198 mp = mp2;
199 ptr = mtod(mp, caddr_t);
200 ret = ptr;
201 bcopy(*dposp, ptr, left); /* Copy what was left */
202 siz2 = siz-left;

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

249
250void *
251nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos)
252{
253 struct mbuf *mb2;
254 void *ret;
255
256 if (s > M_TRAILINGSPACE(*mb)) {
195 mp2->m_next = mp->m_next;
196 mp->m_next = mp2;
197 mp->m_len -= left;
198 mp = mp2;
199 ptr = mtod(mp, caddr_t);
200 ret = ptr;
201 bcopy(*dposp, ptr, left); /* Copy what was left */
202 siz2 = siz-left;

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

249
250void *
251nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos)
252{
253 struct mbuf *mb2;
254 void *ret;
255
256 if (s > M_TRAILINGSPACE(*mb)) {
257 MGET(mb2, M_TRYWAIT, MT_DATA);
257 MGET(mb2, 0, MT_DATA);
258 if (s > MLEN)
259 panic("build > MLEN");
260 (*mb)->m_next = mb2;
261 *mb = mb2;
262 (*mb)->m_len = 0;
263 *bpos = mtod(*mb, caddr_t);
264 }
265 ret = *bpos;

--- 51 unchanged lines hidden ---
258 if (s > MLEN)
259 panic("build > MLEN");
260 (*mb)->m_next = mb2;
261 *mb = mb2;
262 (*mb)->m_len = 0;
263 *bpos = mtod(*mb, caddr_t);
264 }
265 ret = *bpos;

--- 51 unchanged lines hidden ---