Subject: Re: disklabel operations on /dev/rwd0c or /dev/rwd0d
To: None <brucem@cat.co.za>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-arm32
Date: 01/17/2000 10:49:46
"Bruce Martin" <brucem@cat.co.za> writes:

> Hi all,
> 
> I have written some C++ code that uses the disklabel() code. On the i386, I
> will successfully read disk labels, using the device as /dev/rwd0d (the
> whole wd0 disk, not a partition). However, my arm32 system reports
> "disklabel: rwd0d - device not configured." As soon as I change it to use
> /dev/rwd0c  it works, but this does not work on the i386 ("disklabel:
> rwd0c - device not configured"). Why do the arm32 and i386 use different
> partition names (arm32: rwd0c, i386: rwd0d) to indicate the whole disk? Is
> there any way I can change this so both use that same partition.

NetBSD/arm32, and most UNIX-ish systems, use the 'c' partition as the
raw partition.  NetBSD/i386, for historical reasons, uses the 'd'
partition.

There's not much you can easily do about this.

However, you can make your life easier by using the RAW_PART #define.
it's the partition number of the raw partition.  (on i386, it's 3, on
arm32 and many others, it's 2.)

don't forget, not all ports have 8 partitions, either.  some have 16
(And more will be moving that direction over time.)


cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.