summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-09-09 11:27:04 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-09-09 11:27:04 +0000
commit033ac39b09cc83cb2b97557bbb288e1a491cdb3b (patch)
tree46b9116ea1a6163c4b576ace1c640714ab8e4e63 /sys/kern
parent5c210ce0598926ba00570068e5ddb0fbc6725222 (diff)
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@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_mbuf.c6
1 files changed, 5 insertions, 1 deletions
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 <machine/db_machdep.h>
+#include <ddb/db_interface.h>
#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 ? "|+-" : " +-";
}