1*a631873eSchristos /* $NetBSD: disklabel.h,v 1.12 2013/05/16 19:06:44 christos Exp $ */ 2ee733492Ssoren 3ee733492Ssoren /* 4ee733492Ssoren * Copyright (c) 1994 Christopher G. Demetriou 5ee733492Ssoren * All rights reserved. 6ee733492Ssoren * 7ee733492Ssoren * Redistribution and use in source and binary forms, with or without 8ee733492Ssoren * modification, are permitted provided that the following conditions 9ee733492Ssoren * are met: 10ee733492Ssoren * 1. Redistributions of source code must retain the above copyright 11ee733492Ssoren * notice, this list of conditions and the following disclaimer. 12ee733492Ssoren * 2. Redistributions in binary form must reproduce the above copyright 13ee733492Ssoren * notice, this list of conditions and the following disclaimer in the 14ee733492Ssoren * documentation and/or other materials provided with the distribution. 15ee733492Ssoren * 3. All advertising materials mentioning features or use of this software 16ee733492Ssoren * must display the following acknowledgement: 17ee733492Ssoren * This product includes software developed by Christopher G. Demetriou. 18ee733492Ssoren * 4. The name of the author may not be used to endorse or promote products 19ee733492Ssoren * derived from this software without specific prior written permission 20ee733492Ssoren * 21ee733492Ssoren * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22ee733492Ssoren * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23ee733492Ssoren * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24ee733492Ssoren * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25ee733492Ssoren * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26ee733492Ssoren * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27ee733492Ssoren * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28ee733492Ssoren * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29ee733492Ssoren * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30ee733492Ssoren * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31ee733492Ssoren */ 32b2386045Ssoren 33b2386045Ssoren #ifndef _MACHINE_DISKLABEL_H_ 34b2386045Ssoren #define _MACHINE_DISKLABEL_H_ 354c547143Ssoren 36a47e2eb7Sbouyer #define LABELUSESMBR 1 /* use MBR partitionning */ 37793382b2Ssoren #define LABELSECTOR 1 /* sector containing label */ 38793382b2Ssoren #define LABELOFFSET 0 /* offset of label in sector */ 394c547143Ssoren #define MAXPARTITIONS 16 404c547143Ssoren #define RAW_PART 3 414c547143Ssoren 424c547143Ssoren /* 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 */ 484c547143Ssoren 494c547143Ssoren #ifndef __ASSEMBLER__ 50a37289dbSdyoung #if HAVE_NBTOOL_CONFIG_H 51a37289dbSdyoung #include <nbinclude/sys/dkbad.h> 52a37289dbSdyoung #else 534c547143Ssoren #include <sys/dkbad.h> 54a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */ 554c547143Ssoren struct cpu_disklabel { 56*a631873eSchristos struct mbr_partition mbrparts[MBR_PART_COUNT]; 5709dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD 584c547143Ssoren struct dkbad bad; 594c547143Ssoren }; 604c547143Ssoren #endif 61b2386045Ssoren 62b2386045Ssoren #endif /* _MACHINE_DISKLABEL_H_ */ 63