From: bluhm Date: Mon, 9 Sep 2024 11:27:03 +0000 (+0000) Subject: Print mbuf size also for non cluster. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c9f2cb035b5b1d572ae40e6ce8bc6c0d1beecef2;p=openbsd Print mbuf size also for non cluster. Command "ddb> show /c mbuf" always prints mbuf data size. In uipc_mbuf.c include db_interface.h as it contains prototype for m_print_chain(). OK mvs@ --- diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index a0c0ebc9482..8acda07c2ce 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.292 2024/09/05 08:52:27 bluhm Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.293 2024/09/09 11:27:03 bluhm Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -90,6 +90,7 @@ #ifdef DDB #include +#include #endif #if NPF > 0 @@ -1567,6 +1568,9 @@ m_print_chain(void *v, int deep, (*pr)(", pktlen %d", m->m_pkthdr.len); if (m->m_flags & M_EXT) (*pr)(", clsize %u", m->m_ext.ext_size); + else + (*pr)(", size %u", + m->m_flags & M_PKTHDR ? MHLEN : MLEN); (*pr)("\n"); indent = deep ? "|+-" : " +-"; }