From owner-svn-src-head@freebsd.org Sat Aug 8 15:50:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D4639B6287; Sat, 8 Aug 2015 15:50:48 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B2971E92; Sat, 8 Aug 2015 15:50:48 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t78FolPl018521; Sat, 8 Aug 2015 15:50:47 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t78FolXr018517; Sat, 8 Aug 2015 15:50:47 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201508081550.t78FolXr018517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 8 Aug 2015 15:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286450 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2015 15:50:48 -0000 Author: melifaro Date: Sat Aug 8 15:50:46 2015 New Revision: 286450 URL: https://svnweb.freebsd.org/changeset/base/286450 Log: Add const-qualifiers for source mbuf argument in m_dup(), m_copym(), m_dup_pkthdr() and m_tag_copy_chain(). Modified: head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_mbuf2.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sat Aug 8 12:29:03 2015 (r286449) +++ head/sys/kern/uipc_mbuf.c Sat Aug 8 15:50:46 2015 (r286450) @@ -396,7 +396,7 @@ mb_free_ext(struct mbuf *m) * and bump the refcount of the cluster. */ static void -mb_dupcl(struct mbuf *n, struct mbuf *m) +mb_dupcl(struct mbuf *n, const struct mbuf *m) { KASSERT(m->m_flags & M_EXT, ("%s: M_EXT not set on %p", __func__, m)); @@ -567,7 +567,7 @@ m_move_pkthdr(struct mbuf *to, struct mb * In particular, this does a deep copy of the packet tags. */ int -m_dup_pkthdr(struct mbuf *to, struct mbuf *from, int how) +m_dup_pkthdr(struct mbuf *to, const struct mbuf *from, int how) { #if 0 @@ -631,7 +631,7 @@ m_prepend(struct mbuf *m, int len, int h * only their reference counts are incremented. */ struct mbuf * -m_copym(struct mbuf *m, int off0, int len, int wait) +m_copym(const struct mbuf *m, int off0, int len, int wait) { struct mbuf *n, **np; int off = off0; @@ -785,7 +785,7 @@ m_copydata(const struct mbuf *m, int off * you need a writable copy of an mbuf chain. */ struct mbuf * -m_dup(struct mbuf *m, int how) +m_dup(const struct mbuf *m, int how) { struct mbuf **p, *top = NULL; int remain, moff, nsize; Modified: head/sys/kern/uipc_mbuf2.c ============================================================================== --- head/sys/kern/uipc_mbuf2.c Sat Aug 8 12:29:03 2015 (r286449) +++ head/sys/kern/uipc_mbuf2.c Sat Aug 8 15:50:46 2015 (r286450) @@ -427,7 +427,7 @@ m_tag_copy(struct m_tag *t, int how) * destination mbuf. */ int -m_tag_copy_chain(struct mbuf *to, struct mbuf *from, int how) +m_tag_copy_chain(struct mbuf *to, const struct mbuf *from, int how) { struct m_tag *p, *t, *tprev = NULL; Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sat Aug 8 12:29:03 2015 (r286449) +++ head/sys/sys/mbuf.h Sat Aug 8 15:50:46 2015 (r286450) @@ -953,7 +953,7 @@ int m_extadd(struct mbuf *, caddr_t, u struct mbuf *m_collapse(struct mbuf *, int, int); void m_copyback(struct mbuf *, int, int, c_caddr_t); void m_copydata(const struct mbuf *, int, int, caddr_t); -struct mbuf *m_copym(struct mbuf *, int, int, int); +struct mbuf *m_copym(const struct mbuf *, int, int, int); struct mbuf *m_copypacket(struct mbuf *, int); void m_copy_pkthdr(struct mbuf *, struct mbuf *); struct mbuf *m_copyup(struct mbuf *, int, int); @@ -962,8 +962,8 @@ void m_demote_pkthdr(struct mbuf *); void m_demote(struct mbuf *, int, int); struct mbuf *m_devget(char *, int, int, struct ifnet *, void (*)(char *, caddr_t, u_int)); -struct mbuf *m_dup(struct mbuf *, int); -int m_dup_pkthdr(struct mbuf *, struct mbuf *, int); +struct mbuf *m_dup(const struct mbuf *, int); +int m_dup_pkthdr(struct mbuf *, const struct mbuf *, int); u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); @@ -1070,7 +1070,7 @@ void m_tag_delete_chain(struct mbuf *, void m_tag_free_default(struct m_tag *); struct m_tag *m_tag_locate(struct mbuf *, u_int32_t, int, struct m_tag *); struct m_tag *m_tag_copy(struct m_tag *, int); -int m_tag_copy_chain(struct mbuf *, struct mbuf *, int); +int m_tag_copy_chain(struct mbuf *, const struct mbuf *, int); void m_tag_delete_nonpersistent(struct mbuf *); /*