1*2ec4fd84Schristos /* $NetBSD: disklabel.h,v 1.9 2013/05/16 19:06:45 christos Exp $ */ 24c447e53Sscw 34c447e53Sscw /* 44c447e53Sscw * Copyright (c) 1994 Christopher G. Demetriou 54c447e53Sscw * All rights reserved. 64c447e53Sscw * 74c447e53Sscw * Redistribution and use in source and binary forms, with or without 84c447e53Sscw * modification, are permitted provided that the following conditions 94c447e53Sscw * are met: 104c447e53Sscw * 1. Redistributions of source code must retain the above copyright 114c447e53Sscw * notice, this list of conditions and the following disclaimer. 124c447e53Sscw * 2. Redistributions in binary form must reproduce the above copyright 134c447e53Sscw * notice, this list of conditions and the following disclaimer in the 144c447e53Sscw * documentation and/or other materials provided with the distribution. 154c447e53Sscw * 3. All advertising materials mentioning features or use of this software 164c447e53Sscw * must display the following acknowledgement: 174c447e53Sscw * This product includes software developed by Christopher G. Demetriou. 184c447e53Sscw * 4. The name of the author may not be used to endorse or promote products 194c447e53Sscw * derived from this software without specific prior written permission 204c447e53Sscw * 214c447e53Sscw * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 224c447e53Sscw * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 234c447e53Sscw * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 244c447e53Sscw * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 254c447e53Sscw * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 264c447e53Sscw * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 274c447e53Sscw * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 284c447e53Sscw * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 294c447e53Sscw * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 304c447e53Sscw * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 314c447e53Sscw */ 324c447e53Sscw 334c447e53Sscw #ifndef _MACHINE_DISKLABEL_H_ 344c447e53Sscw #define _MACHINE_DISKLABEL_H_ 354c447e53Sscw 36a47e2eb7Sbouyer #define LABELUSESMBR 0 /* no MBR partitionning */ 374c447e53Sscw #define LABELSECTOR 1 /* sector containing label */ 387053887dSmatt #define LABELOFFSET 0 /* offset of label in sector */ 394c447e53Sscw #define MAXPARTITIONS 8 /* number of partitions */ 404c447e53Sscw #define RAW_PART 2 /* raw partition: xx?c */ 414c447e53Sscw 424c447e53Sscw /* Pull in MBR partition definitions. */ 43a37289dbSdyoung #if HAVE_NBTOOL_CONFIG_H 44a37289dbSdyoung #include <nbinclude/sys/bootblock.h> 45a37289dbSdyoung #include <nbinclude/sys/dkbad.h> 46a37289dbSdyoung #else 471c33b4e6Slukem #include <sys/bootblock.h> 484c447e53Sscw #include <sys/dkbad.h> 49a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */ 50a37289dbSdyoung 514c447e53Sscw struct cpu_disklabel { 52*2ec4fd84Schristos struct mbr_partition mbrparts[MBR_PART_COUNT]; 5309dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD 544c447e53Sscw struct dkbad bad; 554c447e53Sscw }; 564c447e53Sscw 574c447e53Sscw #endif /* _MACHINE_DISKLABEL_H_ */ 58