summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-28 22:40:53 +0000
committerderaadt <deraadt@openbsd.org>2002-06-28 22:40:53 +0000
commit32ac5837d41a576568d5ecabf39709236dc801c9 (patch)
tree8b0a5ce029037f5c107d7bae6ddc6b4065ccf611
parentgo back to running these as root from inetd. however once rpc.{rusersd,rstatd} (diff)
downloadwireguard-openbsd-32ac5837d41a576568d5ecabf39709236dc801c9.tar.xz
wireguard-openbsd-32ac5837d41a576568d5ecabf39709236dc801c9.zip
wrap NOKVM variables too
-rw-r--r--usr.bin/vmstat/dkstats.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/vmstat/dkstats.c b/usr.bin/vmstat/dkstats.c
index 9d4e42f1086..631138b1960 100644
--- a/usr.bin/vmstat/dkstats.c
+++ b/usr.bin/vmstat/dkstats.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkstats.c,v 1.18 2002/06/19 08:45:52 deraadt Exp $ */
+/* $OpenBSD: dkstats.c,v 1.19 2002/06/28 22:40:53 deraadt Exp $ */
/* $NetBSD: dkstats.c,v 1.1 1996/05/10 23:19:27 thorpej Exp $ */
/*
@@ -86,12 +86,16 @@ static void deref_kptr(void *, void *, size_t);
struct _disk cur, last;
/* Kernel pointers: nlistf and memf defined in calling program. */
+#if !defined(NOKVM)
static kvm_t *kd = NULL;
+#endif
extern char *nlistf;
extern char *memf;
+#if !defined(NOKVM)
/* Pointer to list of disks. */
static struct disk *dk_drivehead = NULL;
+#endif
/* Backward compatibility references. */
int dk_ndrive = 0;
@@ -152,7 +156,9 @@ dkswap()
void
dkreadstats()
{
+#if !defined(NOKVM)
struct disk cur_disk, *p;
+#endif
int i, mib[3];
size_t size;
struct diskstats *q;
@@ -227,9 +233,11 @@ int
dkinit(select)
int select;
{
+#if !defined(NOKVM)
struct disklist_head disk_head;
struct disk cur_disk, *p;
char errbuf[_POSIX2_LINE_MAX];
+#endif
static int once = 0;
extern int hz;
int i, mib[2];