Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2001 11:36:25 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Sandeep Kohli <fuhrer6mill@yahoo.com>
Cc:        fbsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: accessing ide
Message-ID:  <20010328113625.C5524@ringworld.oblivion.bg>
In-Reply-To: <3AC1D2B2.F3244CA2@yahoo.com>; from fuhrer6mill@yahoo.com on Wed, Mar 28, 2001 at 02:01:54PM %2B0200
References:  <3AC1D2B2.F3244CA2@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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