Subject: Re: query about bounds_check_with_label()
To: Alasdair Baird <alasdair@wildcat.demon.co.uk>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 01/13/1997 13:12:50
On Mon, 13 Jan 1997 20:26:56 +0000
Alasdair Baird <alasdair@wildcat.demon.co.uk> wrote:
> > struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
> > int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
> > int sz;
>
> What made my eyes stop upon this bit of code was the use of the
> constant "2" for identifying the partition offset from which a
> label is found.
... this is the wonderful inconsistency in the i386 port... (*sigh*)
RAW_PART (`d' on the i386) is the whole disk. `c' is the NetBSD portion
of the disk. The disklabel resides in the NetBSD portion of the disk.
Hope that "clears things up" a bit... :-)
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939