Restoring crash dump ability for kvm_getswapinfo(3)
John Baldwin
jhb at freebsd.org
Tue Feb 6 20:57:02 UTC 2007
On Tuesday 06 February 2007 15:46, Attilio Rao wrote:
> 2007/2/6, John Baldwin <jhb at 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?
Yes, as I mentioned, I would prefer that, but they were explicitly moved from
swap_pager.h to swap_pager.c previously, so I'd like to make sure it is ok to
move them back.
--
John Baldwin
More information about the freebsd-arch
mailing list