From owner-freebsd-questions Fri Sep 29 2:29:44 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 736B337B422 for ; Fri, 29 Sep 2000 02:29:13 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e8T9TBx01293; Fri, 29 Sep 2000 02:29:11 -0700 (PDT) Date: Fri, 29 Sep 2000 02:29:11 -0700 From: Alfred Perlstein To: bsdnewbie bsdnewbie Cc: freebsd-questions@FreeBSD.ORG Subject: Re: _use bread(...) to access /dev/ad1 ???!!! Message-ID: <20000929022911.E27736@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from bsdnewbie@hotmail.com on Fri, Sep 29, 2000 at 04:58:44PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * bsdnewbie bsdnewbie [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