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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to