Deleted Added
full compact
smb_rq.c (161523) smb_rq.c (177599)
1/*-
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netsmb/smb_rq.c 161523 2006-08-22 03:05:51Z marcel $");
34__FBSDID("$FreeBSD: head/sys/netsmb/smb_rq.c 177599 2008-03-25 09:39:02Z ru $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/endian.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/module.h>
42#include <sys/proc.h>

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

428
429static int
430smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
431 struct mdchain *mdp)
432{
433 struct mbuf *m, *m0;
434 int len;
435
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/endian.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/module.h>
42#include <sys/proc.h>

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

428
429static int
430smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
431 struct mdchain *mdp)
432{
433 struct mbuf *m, *m0;
434 int len;
435
436 m0 = m_split(mtop, offset, M_TRYWAIT);
437 if (m0 == NULL)
438 return EBADRPC;
436 m0 = m_split(mtop, offset, M_WAIT);
439 len = m_length(m0, &m);
440 m->m_len -= len - count;
441 if (mdp->md_top == NULL) {
442 md_initm(mdp, m0);
443 } else
444 m_cat(mdp->md_top, m0);
445 return 0;
446}

--- 325 unchanged lines hidden ---
437 len = m_length(m0, &m);
438 m->m_len -= len - count;
439 if (mdp->md_top == NULL) {
440 md_initm(mdp, m0);
441 } else
442 m_cat(mdp->md_top, m0);
443 return 0;
444}

--- 325 unchanged lines hidden ---