From b9cf082129e9aee4e22881240ef45376354cdecb Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 24 Jul 2005 01:42:42 +0000 Subject: Since libmemstat(3) now supports its own error management mechanism, use that instead of trying to use errno, in order to produce a sensible error message. MFC after: 1 day --- usr.bin/netstat/mbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/netstat/mbuf.c') diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index b7b41eb..9bb4038 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -205,7 +205,8 @@ mbpr_sysctl(void) * uma(9), and some malloc(9). */ if (memstat_sysctl_all(mtlp, 0) < 0) { - warn("memstat_sysctl_all"); + warnx("memstat_sysctl_all: %s", + memstat_strerror(memstat_mtl_geterror(mtlp))); goto out; } -- cgit v1.1