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