Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 1996 17:47:24 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, rnordier@iafrica.com
Cc:        hackers@FreeBSD.ORG
Subject:   Re: [Q] Raw interface to block devices
Message-ID:  <199605100747.RAA02365@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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. :-)

Actually, it is no help.  It just does a fast search through /dev.  It
doesn't support going from the bdev to the cdev or vice versa.  It can't
support this because even the kernel barely knows the correspondence
between bdevs and cdevs.  In -current, the bdevsw and cdevsw entries
contain pointers to each other.   In -stable there is only the poorly
maintained chrtoblk() routine.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605100747.RAA02365>