Fix order of 2nd and 3rd arguments to fread so the count of the
[unix-history] / usr / src / usr.bin / netstat / mbuf.c
CommitLineData
bad4305f
SL
1#ifndef lint
2static char sccsid[] = "@(#)mbuf.c 4.1 82/08/25";
3#endif
4
5#include <sys/types.h>
6#include <sys/mbuf.h>
7
8struct mbstat mbstat;
9extern int kmem;
10
11/*
12 * Print mbuf statistics.
13 */
14mbpr(mbaddr)
15 off_t mbaddr;
16{
17 if (mbaddr == 0) {
18 printf("mbstat: symbol not in namelist\n");
19 return;
20 }
21 printf("mbufs:");
22 klseek(kmem, mbaddr, 0);
23 if (read(kmem, &mbstat, sizeof (mbstat)) == sizeof (mbstat))
24 printf(
25 " mbufs %d mbfree %d clusters %d clfree %d drops %d\n",
26 mbstat.m_mbufs, mbstat.m_mbfree,
27 mbstat.m_clusters, mbstat.m_clfree, mbstat.m_drops);
28}