From owner-freebsd-questions Fri Sep 29 1:58:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f163.pav1.hotmail.com [64.4.31.163]) by hub.freebsd.org (Postfix) with ESMTP id EC80E37B422 for ; Fri, 29 Sep 2000 01:58:44 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 29 Sep 2000 01:58:44 -0700 Received: from 61.129.200.253 by pv1fd.pav1.hotmail.msn.com with HTTP; Fri, 29 Sep 2000 08:58:44 GMT X-Originating-IP: [61.129.200.253] From: "bsdnewbie bsdnewbie" To: freebsd-questions@FreeBSD.org Subject: _use bread(...) to access /dev/ad1 ???!!! Date: Fri, 29 Sep 2000 16:58:44 CST Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 29 Sep 2000 08:58:44.0531 (UTC) FILETIME=[78B54030:01C029F3] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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? Thanks best regards, bsdnewbie Sep 29, 2k _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message