xref: /netbsd-src/sys/arch/ibmnws/include/disklabel.h (revision 2ec4fd84baea86ae2980e4abc96d967a585dafb7)
1*2ec4fd84Schristos /*	$NetBSD: disklabel.h,v 1.6 2013/05/16 19:06:45 christos Exp $	*/
23dc55c12Smatt 
33dc55c12Smatt /*
43dc55c12Smatt  * Copyright (c) 1994 Christopher G. Demetriou
53dc55c12Smatt  * All rights reserved.
63dc55c12Smatt  *
73dc55c12Smatt  * Redistribution and use in source and binary forms, with or without
83dc55c12Smatt  * modification, are permitted provided that the following conditions
93dc55c12Smatt  * are met:
103dc55c12Smatt  * 1. Redistributions of source code must retain the above copyright
113dc55c12Smatt  *    notice, this list of conditions and the following disclaimer.
123dc55c12Smatt  * 2. Redistributions in binary form must reproduce the above copyright
133dc55c12Smatt  *    notice, this list of conditions and the following disclaimer in the
143dc55c12Smatt  *    documentation and/or other materials provided with the distribution.
153dc55c12Smatt  * 3. All advertising materials mentioning features or use of this software
163dc55c12Smatt  *    must display the following acknowledgement:
173dc55c12Smatt  *      This product includes software developed by Christopher G. Demetriou.
183dc55c12Smatt  * 4. The name of the author may not be used to endorse or promote products
193dc55c12Smatt  *    derived from this software without specific prior written permission
203dc55c12Smatt  *
213dc55c12Smatt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
223dc55c12Smatt  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
233dc55c12Smatt  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
243dc55c12Smatt  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
253dc55c12Smatt  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
263dc55c12Smatt  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
273dc55c12Smatt  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
283dc55c12Smatt  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
293dc55c12Smatt  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
303dc55c12Smatt  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
313dc55c12Smatt  */
323dc55c12Smatt 
333dc55c12Smatt #ifndef _IBMNWS_DISKLABEL_H_
343dc55c12Smatt #define _IBMNWS_DISKLABEL_H_
353dc55c12Smatt 
36a47e2eb7Sbouyer #define LABELUSESMBR	0		/* no MBR partitionning */
373dc55c12Smatt #define	LABELSECTOR	1		/* sector containing label */
383dc55c12Smatt #define	LABELOFFSET	0		/* offset of label in sector */
393dc55c12Smatt #define	MAXPARTITIONS	16		/* number of partitions */
403dc55c12Smatt #define	RAW_PART	2		/* raw partition: xx?c */
413dc55c12Smatt 
423dc55c12Smatt /* 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
473dc55c12Smatt #include <sys/bootblock.h>
483dc55c12Smatt #include <sys/dkbad.h>
49a37289dbSdyoung #endif /* HAVE_NBTOOL_CONFIG_H */
503dc55c12Smatt 
513dc55c12Smatt struct cpu_disklabel {
52*2ec4fd84Schristos 	struct mbr_partition mbrparts[MBR_PART_COUNT];
5309dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD
543dc55c12Smatt 	struct dkbad bad;
553dc55c12Smatt };
563dc55c12Smatt 
573dc55c12Smatt #endif /* _IBMNWS_DISKLABEL_H_ */
58