Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 02:29:11 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        bsdnewbie bsdnewbie <bsdnewbie@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: _use bread(...) to access /dev/ad1 ???!!!
Message-ID:  <20000929022911.E27736@fw.wintelcom.net>
In-Reply-To: <F163Q1B5QDnEDisywkG00007810@hotmail.com>; from bsdnewbie@hotmail.com on Fri, Sep 29, 2000 at 04:58:44PM -0600
References:  <F163Q1B5QDnEDisywkG00007810@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* bsdnewbie bsdnewbie <bsdnewbie@hotmail.com> [000929 01:58] wrote:
> I want to access /dev/ad1 via the strategy function "adstrategy" in the file 
> "ata-disk.c".
> 
> I can get the dev_t & softc structure of ad1 and no slice on ad1 was 
> mounted.
> 
> My problem is:
> 1) How to call the function adstategy?
> 
> 2) Someone said that the function bread(struct vnode *, ...) can do, but I 
> do not know how to get the vnode arg.  How to use this function? The "man 
> vnode" said that an active file has a vnode, and in unix, devices are also 
> files, so it seems that ad1 has a corresponding vnode, but how to get it?
> 
> 3) if bread() is used to read, bwrite() is used to write, why bwrite does 
> not has the vnode arg while bread have?
> 

I'm guessing it's 

int
bdevvp(dev, vpp)

but i may be wrong.

-Alfred


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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