/* $NetBSD: disklabel.h,v 1.2 2013/08/22 00:25:35 matt Exp $ */
/*
* Copyright (c) 1995 Dale Rahn.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* number of boot pieces , ie xxboot bootxx */
#define NUMBOOT 0
#define LABELUSESMBR 1 /* no MBR partitionning */
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
#define MAXPARTITIONS 16 /* number of partitions */
#define RAW_PART 2 /* raw partition: xx?c */
/*
* a cpu_disklabel is a disklabel that the bug (prom) can understand
* and live with. the bug works in terms of 256 byte blocks. in our
* case the first two bug blocks make up the cpu_disklabel (which is 512
* bytes [i.e. one sector] in length).
*
* we use a fixed layout the BSD disk structure (in 256 byte blocks):
* block 0 = the volume ID block (part of cpu_disklabel)
* block 1 = media configuration area (part of cpu_disklabel)
* block 2 = start of first level OS bootstrap (continues ...)
* block 31 = end of OS bootstrap
* block 32 = BSD filesystem superblock
*
* this gives us 30 blocks (30*256 = 7680 bytes) for the bootstrap's text+data
*
* disksubr.c translates between cpu_disklabel and BSD disklabel.
*
*/