From owner-freebsd-current Wed May 12 1: 4:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.40.153]) by hub.freebsd.org (Postfix) with ESMTP id 3CC8014D18 for ; Wed, 12 May 1999 01:04:12 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by phk.freebsd.dk (8.9.1/8.8.8) with ESMTP id KAA23726 for ; Wed, 12 May 1999 10:04:12 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.2/8.9.2) with ESMTP id KAA03696 for ; Wed, 12 May 1999 10:04:09 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org Subject: simple (but important) task for junior kernel hacker From: Poul-Henning Kamp Date: Wed, 12 May 1999 10:04:09 +0200 Message-ID: <3694.926496249@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I don't have time just now to attend this particular detail, which manifests itself by swapinfo/pstat -p showing "/dev/(null)" for device name. The problem in short is that libkvm:kvm_getswapinfo.c has it's fingers in the kernels memory and pulls out a dev_t without knowing how to (and it shouldn't be taught this!) convert it to a udev_t. The Right Way to solve this problem is to rewrite libkvm:kvm_getswapinfo.c to pick up the information using some (for this purpose constructed) sysctl variables (sysctlbyname(3) please!), and let the kernel convert the dev_t to udev_t before passing it out to userland. So for any aspiring kernel hackers out there: have at it. Patches accepted. In general libkvm should not grovel around in a running kernel but only use sysctlbyname(3). -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message