xref: /netbsd/sys/arch/amigappc/include/disklabel.h (revision 509fd41b)
1*509fd41bSbouyer /*	$NetBSD: disklabel.h,v 1.3 2011/08/30 12:39:53 bouyer Exp $	*/
20ce3451dSis 
30ce3451dSis /*
40ce3451dSis  * Copyright (c) 1994 Christian E. Hopps
50ce3451dSis  * All rights reserved.
60ce3451dSis  *
70ce3451dSis  * Redistribution and use in source and binary forms, with or without
80ce3451dSis  * modification, are permitted provided that the following conditions
90ce3451dSis  * are met:
100ce3451dSis  * 1. Redistributions of source code must retain the above copyright
110ce3451dSis  *    notice, this list of conditions and the following disclaimer.
120ce3451dSis  * 2. Redistributions in binary form must reproduce the above copyright
130ce3451dSis  *    notice, this list of conditions and the following disclaimer in the
140ce3451dSis  *    documentation and/or other materials provided with the distribution.
150ce3451dSis  * 3. All advertising materials mentioning features or use of this software
160ce3451dSis  *    must display the following acknowledgement:
170ce3451dSis  *      This product includes software developed by Christian E. Hopps.
180ce3451dSis  * 4. The name of the author may not be used to endorse or promote products
190ce3451dSis  *    derived from this software without specific prior written permission
200ce3451dSis  *
210ce3451dSis  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
220ce3451dSis  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
230ce3451dSis  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
240ce3451dSis  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
250ce3451dSis  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
260ce3451dSis  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
270ce3451dSis  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
280ce3451dSis  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
290ce3451dSis  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
300ce3451dSis  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
310ce3451dSis  */
320ce3451dSis #ifndef _MACHINE_DISKLABEL_H_
330ce3451dSis #define _MACHINE_DISKLABEL_H_
340ce3451dSis 
35*509fd41bSbouyer #define LABELUSESMBR	0			/* no MBR partitionning */
360ce3451dSis #define	LABELSECTOR	0			/* sector containing label */
370ce3451dSis #define	LABELOFFSET	64			/* offset of label in sector */
380ce3451dSis #define	MAXPARTITIONS	16			/* number of partitions */
390ce3451dSis #define	RAW_PART	2			/* raw partition: xx?c */
400ce3451dSis 
413bef2458Sphx /* Pull in RDB partition definitions. */
423bef2458Sphx #if HAVE_NBTOOL_CONFIG_H
433bef2458Sphx #include <nbinclude/sys/disklabel_rdb.h>
443bef2458Sphx #else
453bef2458Sphx #include <sys/disklabel_rdb.h>
463bef2458Sphx #endif /* HAVE_NBTOOL_CONFIG_H */
470ce3451dSis 
480ce3451dSis struct cpu_disklabel {
490ce3451dSis 	u_long rdblock;			/* may be RDBNULL which invalidates */
500ce3451dSis 	u_long pblist[MAXPARTITIONS];	/* partblock number (RDB list order) */
510ce3451dSis 	int pbindex[MAXPARTITIONS];	/* index of pblock (partition order) */
520ce3451dSis 	int  valid;			/* essential that this is valid */
530ce3451dSis };
540ce3451dSis 
550ce3451dSis #endif /* _MACHINE_DISKLABEL_H_ */
56