1*a631873eSchristos /* $NetBSD: disklabel.h,v 1.11 2013/05/16 19:06:44 christos Exp $ */ 2fe3d055dSsakamoto 3fe3d055dSsakamoto /* 4fe3d055dSsakamoto * Copyright (c) 1994 Christopher G. Demetriou 5fe3d055dSsakamoto * All rights reserved. 6fe3d055dSsakamoto * 7fe3d055dSsakamoto * Redistribution and use in source and binary forms, with or without 8fe3d055dSsakamoto * modification, are permitted provided that the following conditions 9fe3d055dSsakamoto * are met: 10fe3d055dSsakamoto * 1. Redistributions of source code must retain the above copyright 11fe3d055dSsakamoto * notice, this list of conditions and the following disclaimer. 12fe3d055dSsakamoto * 2. Redistributions in binary form must reproduce the above copyright 13fe3d055dSsakamoto * notice, this list of conditions and the following disclaimer in the 14fe3d055dSsakamoto * documentation and/or other materials provided with the distribution. 15fe3d055dSsakamoto * 3. All advertising materials mentioning features or use of this software 16fe3d055dSsakamoto * must display the following acknowledgement: 17fe3d055dSsakamoto * This product includes software developed by Christopher G. Demetriou. 18fe3d055dSsakamoto * 4. The name of the author may not be used to endorse or promote products 19fe3d055dSsakamoto * derived from this software without specific prior written permission 20fe3d055dSsakamoto * 21fe3d055dSsakamoto * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22fe3d055dSsakamoto * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23fe3d055dSsakamoto * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24fe3d055dSsakamoto * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25fe3d055dSsakamoto * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26fe3d055dSsakamoto * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27fe3d055dSsakamoto * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28fe3d055dSsakamoto * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29fe3d055dSsakamoto * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30fe3d055dSsakamoto * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31fe3d055dSsakamoto */ 32fe3d055dSsakamoto 33fe3d055dSsakamoto #ifndef _MACHINE_DISKLABEL_H_ 34fe3d055dSsakamoto #define _MACHINE_DISKLABEL_H_ 35fe3d055dSsakamoto 36a47e2eb7Sbouyer #define LABELUSESMBR 0 /* no MBR partitionning */ 37fe3d055dSsakamoto #define LABELSECTOR 1 /* sector containing label */ 38fe3d055dSsakamoto #define LABELOFFSET 0 /* offset of label in sector */ 39fe3d055dSsakamoto #define MAXPARTITIONS 8 /* number of partitions */ 40fe3d055dSsakamoto #define RAW_PART 3 /* raw partition: XX?d (XXX) */ 41fe3d055dSsakamoto 42cb8268a3Sthorpej /* Pull in MBR partition definitions. */ 43a37289dbSdyoung #if HAVE_NBTOOL_CONFIG_H 44a37289dbSdyoung #include <nbinclude/sys/bootblock.h> 45a37289dbSdyoung #else 461c33b4e6Slukem #include <sys/bootblock.h> 47a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */ 48fe3d055dSsakamoto 49a37289dbSdyoung #if HAVE_NBTOOL_CONFIG_H 50a37289dbSdyoung #include <nbinclude/sys/dkbad.h> 51a37289dbSdyoung #else 52fe3d055dSsakamoto #include <sys/dkbad.h> 53a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */ 54fe3d055dSsakamoto struct cpu_disklabel { 55*a631873eSchristos struct mbr_partition mbrparts[MBR_PART_COUNT]; 5609dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD 57fe3d055dSsakamoto struct dkbad bad; 58fe3d055dSsakamoto }; 59fe3d055dSsakamoto 60fe3d055dSsakamoto #endif /* _MACHINE_DISKLABEL_H_ */ 61