-/* $OpenBSD: mbuf.h,v 1.259 2023/07/04 09:47:51 jsg Exp $ */
+/* $OpenBSD: mbuf.h,v 1.260 2023/07/07 14:17:34 yasuoka Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
u_long m_drops; /* times failed to find space */
u_long m_wait; /* times waited for space */
u_long m_drain; /* times drained protocols for space */
- u_short m_mtypes[256]; /* type specific mbuf allocations */
+ u_long m_mtypes[256]; /* type specific mbuf allocations */
};
#define MBSTAT_TYPES MT_NTYPES
-/* $OpenBSD: mbuf.c,v 1.43 2019/07/16 17:39:02 bluhm Exp $ */
+/* $OpenBSD: mbuf.c,v 1.44 2023/07/07 14:17:35 yasuoka Exp $ */
/* $NetBSD: mbuf.c,v 1.9 1996/05/07 02:55:03 thorpej Exp $ */
/*
{ 0, 0 }
};
-int nmbtypes = sizeof(mbstat.m_mtypes) / sizeof(short);
+int nmbtypes = sizeof(mbstat.m_mtypes) / sizeof(u_long);
bool seen[256]; /* "have we seen this type yet?" */
/*
for (mp = mbtypes; mp->mt_name; mp++)
if (mbstat.m_mtypes[mp->mt_type]) {
seen[mp->mt_type] = YES;
- printf("\t%u mbuf%s allocated to %s\n",
+ printf("\t%lu mbuf%s allocated to %s\n",
mbstat.m_mtypes[mp->mt_type],
plural(mbstat.m_mtypes[mp->mt_type]),
mp->mt_name);
seen[MT_FREE] = YES;
for (i = 0; i < nmbtypes; i++)
if (!seen[i] && mbstat.m_mtypes[i]) {
- printf("\t%u mbuf%s allocated to <mbuf type %d>\n",
+ printf("\t%lu mbuf%s allocated to <mbuf type %d>\n",
mbstat.m_mtypes[i],
plural(mbstat.m_mtypes[i]), i);
}