From owner-freebsd-current Mon Nov 26 13: 9:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 141BF37B442 for ; Mon, 26 Nov 2001 13:08:53 -0800 (PST) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.11.3/8.10.1) with ESMTP id fAQL90J64084; Mon, 26 Nov 2001 13:09:00 -0800 (PST) Date: Mon, 26 Nov 2001 13:08:59 -0800 (PST) From: Doug White To: Emiel Kollof Cc: Subject: Re: kvm_getswapinfo() not backwards compatible? In-Reply-To: <20011126193305.C546@laptop.hackerheaven.org> Message-ID: X-All-Your-Base: are belong to us MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 26 Nov 2001, Emiel Kollof wrote: > Hey gang, > > I have the following piece of code: > > extern void > getswapload() > { > > struct kvm_swap swap[1]; > int pgsize, > swapused, n; > > kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open"); This looks wrong .... I think you want the first three arguments to be NULL, not "/dev/null". /dev/null is not a kernel image. :-) Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message