summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-12-19 14:12:00 +0000
committertedu <tedu@openbsd.org>2014-12-19 14:12:00 +0000
commit72cf226440651b3834bc6919660d191c506aeccf (patch)
treeeb69dafd9847aca2b415308657cdcd455d8a855b /usr.sbin/pstat
parent1. -T (totalflag) requires nlist too. (diff)
downloadwireguard-openbsd-72cf226440651b3834bc6919660d191c506aeccf.tar.xz
wireguard-openbsd-72cf226440651b3834bc6919660d191c506aeccf.zip
don't print vnodes if we didn't read them
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 5cdbb008085..6aa3f568a92 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.95 2014/12/19 14:08:20 tedu Exp $ */
+/* $OpenBSD: pstat.c,v 1.96 2014/12/19 14:12:00 tedu Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -341,6 +341,8 @@ vnodemode(void)
(void)printf("%7d vnodes\n", numvnodes);
return;
}
+ if (!e_vnodebase)
+ return;
endvnode = e_vnodebase + numvnodes;
(void)printf("%d active vnodes\n", numvnodes);