11.8Sbouyer/*	$NetBSD: disklabel.h,v 1.8 2011/08/30 12:39:53 bouyer Exp $	*/
21.4Scgd
31.1Schopps/*
41.1Schopps * Copyright (c) 1994 Christian E. Hopps
51.1Schopps * All rights reserved.
61.1Schopps *
71.1Schopps * Redistribution and use in source and binary forms, with or without
81.1Schopps * modification, are permitted provided that the following conditions
91.1Schopps * are met:
101.1Schopps * 1. Redistributions of source code must retain the above copyright
111.1Schopps *    notice, this list of conditions and the following disclaimer.
121.1Schopps * 2. Redistributions in binary form must reproduce the above copyright
131.1Schopps *    notice, this list of conditions and the following disclaimer in the
141.1Schopps *    documentation and/or other materials provided with the distribution.
151.1Schopps * 3. All advertising materials mentioning features or use of this software
161.1Schopps *    must display the following acknowledgement:
171.1Schopps *      This product includes software developed by Christian E. Hopps.
181.1Schopps * 4. The name of the author may not be used to endorse or promote products
191.1Schopps *    derived from this software without specific prior written permission
201.1Schopps *
211.1Schopps * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Schopps * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Schopps * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Schopps * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Schopps * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Schopps * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Schopps * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Schopps * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Schopps * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Schopps * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Schopps */
321.1Schopps#ifndef _MACHINE_DISKLABEL_H_
331.1Schopps#define _MACHINE_DISKLABEL_H_
341.1Schopps
351.8Sbouyer#define LABELUSESMBR	0			/* no MBR partitionning */
361.3Scgd#define	LABELSECTOR	0			/* sector containing label */
371.3Scgd#define	LABELOFFSET	64			/* offset of label in sector */
381.3Scgd#define	MAXPARTITIONS	16			/* number of partitions */
391.3Scgd#define	RAW_PART	2			/* raw partition: xx?c */
401.1Schopps
411.7Sphx/* Pull in RDB partition definitions. */
421.7Sphx#if HAVE_NBTOOL_CONFIG_H
431.7Sphx#include <nbinclude/sys/disklabel_rdb.h>
441.7Sphx#else
451.7Sphx#include <sys/disklabel_rdb.h>
461.7Sphx#endif /* HAVE_NBTOOL_CONFIG_H */
471.1Schopps
481.1Schoppsstruct cpu_disklabel {
491.1Schopps	u_long rdblock;			/* may be RDBNULL which invalidates */
501.1Schopps	u_long pblist[MAXPARTITIONS];	/* partblock number (RDB list order) */
511.6Sveego	int pbindex[MAXPARTITIONS];	/* index of pblock (partition order) */
521.1Schopps	int  valid;			/* essential that this is valid */
531.1Schopps};
541.1Schopps
551.1Schopps#endif /* _MACHINE_DISKLABEL_H_ */
56