Date: Wed, 22 Jul 1998 11:22:40 +0930 From: Greg Lehey <grog@lemis.com> To: FreeBSD Hackers <hackers@FreeBSD.ORG> Subject: How do I access a block device in -CURRENT? Message-ID: <19980722112240.K8098@freebie.lemis.com>
next in thread | raw e-mail | index | archive | help
Since the change in bdevsw/cdevsw in -CURRENT, I have a problem: how
do I access block devices from a driver? Previously I would do
something like
(*bdevsw [major (devno)]->d_strategy) (bp);
I'm not supposed to use bdevsw any more, I should use cdevsw instead.
But the major numbers are different. How do I find the correct major
number? I went through the way the system does it, and found:
#2 0xf014959e in spec_strategy (ap=0xf439de30) at ../../miscfs/specfs/spec_vnops.c:556
556 (*bdevsw[major(bp->b_dev)]->d_strategy)(bp);
So what's the story now? Is bdevsw dead or not? How do I access the
devices? One obvious choice would be to give block and character
devices the same major numbers, like System V does, but the problems
on changeover would be horrendous.
Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980722112240.K8098>
