From owner-freebsd-arch@FreeBSD.ORG Tue Feb 6 21:13:16 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8989016A402 for ; Tue, 6 Feb 2007 21:13:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 26E5B13C494 for ; Tue, 6 Feb 2007 21:13:15 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so278780nfc for ; Tue, 06 Feb 2007 13:13:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=crQrQREhBSOq22Oe0TcHP9Qc0g41ybbdR7sapJViDQ+4HtYKaUxc6ioSZ/C1AkyqmUWtxaSPlN10fpfJqADJTe9kHtrqCZg+NI8YRU7JjkDo6GcjSn+fCNre4CHhVkb8M2nR1yTK0MMCrzAmBxJ7JSAtnYwd3o7zljJHx9TnI/Q= Received: by 10.82.136.4 with SMTP id j4mr5192053bud.1170794774248; Tue, 06 Feb 2007 12:46:14 -0800 (PST) Received: by 10.48.238.9 with HTTP; Tue, 6 Feb 2007 12:46:14 -0800 (PST) Message-ID: <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com> Date: Tue, 6 Feb 2007 21:46:14 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "John Baldwin" In-Reply-To: <200702061537.54056.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200702061537.54056.jhb@freebsd.org> X-Google-Sender-Auth: 3b650e85f0c74580 Cc: arch@freebsd.org Subject: Re: Restoring crash dump ability for kvm_getswapinfo(3) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 21:13:16 -0000 2007/2/6, John Baldwin : > 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