Date: Tue, 6 Feb 2007 21:46:14 +0100 From: "Attilio Rao" <attilio@freebsd.org> To: "John Baldwin" <jhb@freebsd.org> Cc: arch@freebsd.org Subject: Re: Restoring crash dump ability for kvm_getswapinfo(3) Message-ID: <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com> In-Reply-To: <200702061537.54056.jhb@freebsd.org> References: <200702061537.54056.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2007/2/6, John Baldwin <jhb@freebsd.org>: > The patch below fixes kvm_getswapinfo(3) (and thus pstat -T/pstat -s/swapinfo) > on crash dumps. The one ugliness in it is that since 'struct swdevt' was > moved into swap_pager.c, there is no longer a header that I can include to > get it (used to be in vm/swap_pager.h) so I have a copy of the structure in > kvm_getswapinfo.c. I'd prefer to move the structures back into > vm/swap_pager.h. > > Index: kvm_getswapinfo.c > =================================================================== > RCS file: /usr/cvs/src/lib/libkvm/kvm_getswapinfo.c,v > retrieving revision 1.26 > diff -u -r1.26 kvm_getswapinfo.c > --- kvm_getswapinfo.c 31 Jul 2004 18:49:53 -0000 1.26 > +++ kvm_getswapinfo.c 6 Feb 2007 20:31:09 -0000 > @@ -49,18 +49,59 @@ > > #include "kvm_private.h" > > -#define NL_SWAPBLIST 0 > -#define NL_SWDEVT 1 > -#define NL_NSWDEV 2 > -#define NL_DMMAX 3 > +/* Grrr, this is hidden in swap_pager.c now, how annoying. */ > +typedef int32_t swblk_t; It would not be better exporting swblk_t definition into swap_pager.h, while you are here? Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2>