Module Name: src
Committed By: dyoung
Date: Wed May 4 01:11:29 UTC 2011
Modified Files:
src/usr.bin/netstat: unix.c
Log Message:
Access the kvm_t using get_kvmd(), only.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/netstat/unix.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/netstat/unix.c
diff -u src/usr.bin/netstat/unix.c:1.31 src/usr.bin/netstat/unix.c:1.32
--- src/usr.bin/netstat/unix.c:1.31 Mon Dec 13 21:15:30 2010
+++ src/usr.bin/netstat/unix.c Wed May 4 01:11:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: unix.c,v 1.31 2010/12/13 21:15:30 pooka Exp $ */
+/* $NetBSD: unix.c,v 1.32 2011/05/04 01:11:29 dyoung Exp $ */
/*-
* Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)unix.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: unix.c,v 1.31 2010/12/13 21:15:30 pooka Exp $");
+__RCSID("$NetBSD: unix.c,v 1.32 2011/05/04 01:11:29 dyoung Exp $");
#endif
#endif /* not lint */
@@ -73,7 +73,6 @@
static struct file *file, *fileNFILE;
static int ns_nfiles;
-extern kvm_t *kvmd;
static void
unixdomainprhdr(void)
@@ -210,9 +209,9 @@
goto again;
}
} else {
- filebuf = (char *)kvm_getfiles(kvmd, KERN_FILE, 0, &ns_nfiles);
+ filebuf = (char *)kvm_getfiles(get_kvmd(), KERN_FILE, 0, &ns_nfiles);
if (filebuf == 0) {
- printf("file table read error: %s", kvm_geterr(kvmd));
+ printf("file table read error: %s", kvm_geterr(get_kvmd()));
return;
}
file = (struct file *)(filebuf + sizeof(fp));