Date: Fri, 5 Feb 1999 20:50:16 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: William Woods <wwoods@cybcon.com> Cc: current@FreeBSD.ORG, Bruce Evans <bde@zeta.org.au> Subject: Re: Top not working in -Current?? Message-ID: <199902060450.UAA03021@apollo.backplane.com> References: <XFMail.990205203938.wwoods@cybcon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:And the fix is.....
:
:On 06-Feb-99 Matthew Dillon wrote:
:>
:>:
:>:Bruce
:>
:> Ahhhhhhhhhhh. Easy to fix.
:>
:
This this patch to /usr/src/lib/libkvm/kvm_getswapinfo.c. Then
recompile libkvm and try top and pstat -s again.
-Matt
Matthew Dillon
<dillon@backplane.com>
Index: kvm_getswapinfo.c
===================================================================
RCS file: /home/ncvs/src/lib/libkvm/kvm_getswapinfo.c,v
retrieving revision 1.4
diff -u -r1.4 kvm_getswapinfo.c
--- kvm_getswapinfo.c 1999/01/27 11:29:15 1.4
+++ kvm_getswapinfo.c 1999/02/06 04:46:48
@@ -127,10 +127,10 @@
KGET(NL_NSWDEV, nswdev);
KGET(NL_DMMAX, dmmax);
- if (kvm_swap_nl[NL_SWAPLIST].n_value)
+ if (kvm_swap_nl[NL_SWAPLIST].n_type != N_UNDF)
type = 1;
- if (kvm_swap_nl[NL_SWAPBLIST].n_value)
+ if (kvm_swap_nl[NL_SWAPBLIST].n_type != N_UNDF)
type = 2;
/*
@@ -406,6 +406,13 @@
struct blist blcopy = { 0 };
KGET(NL_SWAPBLIST, swapblist);
+
+ if (swapblist == NULL) {
+ if (flags & SWIF_DUMP_TREE)
+ printf("radix tree: NULL - no swap in system\n");
+ return;
+ }
+
KGET2(swapblist, &blcopy, sizeof(blcopy), "*swapblist");
if (flags & SWIF_DUMP_TREE) {
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902060450.UAA03021>
