From e0068c3a695a932b57fe1ebd01be8bbcf1115f9a Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Tue, 30 Aug 2005 21:14:30 +0000 Subject: [PATCH] Unbreak m_demote() and put back the 'all' flag. Without it we cannot correctly test for m_nextpkt in an mbuf chain. --- sys/kern/uipc_mbuf.c | 4 +++- sys/sys/mbuf.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 4f66fe3d8e2b..dea90e78c77a 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -271,9 +271,11 @@ mb_free_ext(struct mbuf *m) /* * Clean up mbuf (chain) from any tags and packet headers. + * If "all" is set then the first mbuf in the chain will be + * cleaned too. */ void -m_demote(struct mbuf *m0) +m_demote(struct mbuf *m0, int all) { struct mbuf *m; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 96de92026f9d..7696fa4964eb 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -579,7 +579,7 @@ struct mbuf *m_copypacket(struct mbuf *, int); void m_copy_pkthdr(struct mbuf *, struct mbuf *); struct mbuf *m_copyup(struct mbuf *n, int len, int dstoff); struct mbuf *m_defrag(struct mbuf *, int); -void m_demote(struct mbuf *); +void m_demote(struct mbuf *, int); struct mbuf *m_devget(char *, int, int, struct ifnet *, void (*)(char *, caddr_t, u_int)); struct mbuf *m_dup(struct mbuf *, int);