1*2ec4fd84Schristos /* $NetBSD: disklabel.h,v 1.10 2013/05/16 19:06:45 christos Exp $ */ 237eb9eebSnonaka 337eb9eebSnonaka /* 437eb9eebSnonaka * Copyright (c) 1994 Christopher G. Demetriou 537eb9eebSnonaka * All rights reserved. 637eb9eebSnonaka * 737eb9eebSnonaka * Redistribution and use in source and binary forms, with or without 837eb9eebSnonaka * modification, are permitted provided that the following conditions 937eb9eebSnonaka * are met: 1037eb9eebSnonaka * 1. Redistributions of source code must retain the above copyright 1137eb9eebSnonaka * notice, this list of conditions and the following disclaimer. 1237eb9eebSnonaka * 2. Redistributions in binary form must reproduce the above copyright 1337eb9eebSnonaka * notice, this list of conditions and the following disclaimer in the 1437eb9eebSnonaka * documentation and/or other materials provided with the distribution. 1537eb9eebSnonaka * 3. All advertising materials mentioning features or use of this software 1637eb9eebSnonaka * must display the following acknowledgement: 1737eb9eebSnonaka * This product includes software developed by Christopher G. Demetriou. 1837eb9eebSnonaka * 4. The name of the author may not be used to endorse or promote products 1937eb9eebSnonaka * derived from this software without specific prior written permission 2037eb9eebSnonaka * 2137eb9eebSnonaka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2237eb9eebSnonaka * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2337eb9eebSnonaka * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2437eb9eebSnonaka * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2537eb9eebSnonaka * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2637eb9eebSnonaka * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2737eb9eebSnonaka * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2837eb9eebSnonaka * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2937eb9eebSnonaka * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3037eb9eebSnonaka * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3137eb9eebSnonaka */ 3237eb9eebSnonaka 3337eb9eebSnonaka #ifndef _MACHINE_DISKLABEL_H_ 3437eb9eebSnonaka #define _MACHINE_DISKLABEL_H_ 3537eb9eebSnonaka 36a47e2eb7Sbouyer #define LABELUSESMBR 1 /* use MBR partitionning */ 3737eb9eebSnonaka #define LABELSECTOR 1 /* sector containing label */ 38e8db5533Smatt #define LABELOFFSET 0 /* offset of label in sector */ 3937eb9eebSnonaka #define MAXPARTITIONS 8 /* number of partitions */ 4037eb9eebSnonaka #define RAW_PART 2 /* raw partition: xx?c */ 4137eb9eebSnonaka 42a37289dbSdyoung #if HAVE_NBTOOL_CONFIG_H 43a37289dbSdyoung #include <nbinclude/sys/bootblock.h> /* Pull in MBR partition definitions. */ 44a37289dbSdyoung #include <nbinclude/sys/dkbad.h> 45a37289dbSdyoung #else 46a37289dbSdyoung #include <sys/bootblock.h> /* Pull in MBR partition definitions. */ 4737eb9eebSnonaka #include <sys/dkbad.h> 48a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */ 4937eb9eebSnonaka struct cpu_disklabel { 50*2ec4fd84Schristos struct mbr_partition mbrparts[MBR_PART_COUNT]; 5109dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD 5237eb9eebSnonaka struct dkbad bad; 5337eb9eebSnonaka }; 5437eb9eebSnonaka 5537eb9eebSnonaka #endif /* _MACHINE_DISKLABEL_H_ */ 56