From owner-freebsd-hackers Wed Mar 28 0:37:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 5D9CC37B71C for ; Wed, 28 Mar 2001 00:37:27 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 6911 invoked by uid 1000); 28 Mar 2001 08:36:25 -0000 Date: Wed, 28 Mar 2001 11:36:25 +0300 From: Peter Pentchev To: Sandeep Kohli Cc: fbsd-hackers Subject: Re: accessing ide Message-ID: <20010328113625.C5524@ringworld.oblivion.bg> Mail-Followup-To: Sandeep Kohli , fbsd-hackers References: <3AC1D2B2.F3244CA2@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3AC1D2B2.F3244CA2@yahoo.com>; from fuhrer6mill@yahoo.com on Wed, Mar 28, 2001 at 02:01:54PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Mar 28, 2001 at 02:01:54PM +0200, Sandeep Kohli wrote: > hi, > i am writing kinda fdisk program..now when i opened /dev/hda in linux > and tried to lseek to the mbr it worked > but its not working in freebsd when i am trying to access /dev/wd0 > i donot want to use disklabel.h > thanks I think you need to open the *c device to get raw device I/O. In your case that would be /dev/wd0c. And btw, another part of your problem could be that FreeBSD has used ad, not wd, for ATAPI devices access for some time; unless you're running < 4.0 (or hmm, somebody correct me: when did the wd -> ad transition take place?), try opening /dev/ad0 or /dev/ad0c. Both 'head -c 512 /dev/ad0 | hd' and 'head -c 512 /dev/ad0c | hd' work for me, on 4.2-stable (4.3-RC from March 25th). G'luck, Peter -- If there were no counterfactuals, this sentence would not have been paradoxical. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message