From owner-freebsd-hackers Thu May 9 20:22:03 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA14333 for hackers-outgoing; Thu, 9 May 1996 20:22:03 -0700 (PDT) Received: from eac.iafrica.com (h196-7-192-131.iafrica.com [196.7.192.131]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id UAA14316 for ; Thu, 9 May 1996 20:21:55 -0700 (PDT) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id FAA00842; Fri, 10 May 1996 05:20:17 +0200 From: Robert Nordier Message-Id: <199605100320.FAA00842@eac.iafrica.com> Subject: Re: [Q] Raw interface to block devices To: bde@zeta.org.au (Bruce Evans) Date: Fri, 10 May 1996 05:20:16 +0200 (SAT) Cc: hackers@FreeBSD.ORG In-Reply-To: <199605100121.LAA20111@godzilla.zeta.org.au> from "Bruce Evans" at May 10, 96 11:21:39 am X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bruce Evans wrote: > devname(3) seems to be almost what you want. You can stat the first name > to get the dev number and then call devname() to get the other name. It > searches quickly through all the names in /var/run/dev.db. I've just tried that, and it seems to be _exactly_ what I want. :-) > devname() seems to be used only in ps and pstat. It should be used in > badsect, fsck ... (fsck has its own functions rawname() and unrawname()). > > ps has a bogus private copy of /usr/src/lib/libc/gen/devname.c. I was looking at fsck, and rather hoped for something better. Thanks! -- Robert Nordier