11.4Schristos/*	$NetBSD: disklabel.h,v 1.4 2013/05/16 19:06:45 christos Exp $	*/
21.1Sgarbled
31.1Sgarbled/*
41.1Sgarbled * Copyright (c) 1994 Christopher G. Demetriou
51.1Sgarbled * All rights reserved.
61.1Sgarbled *
71.1Sgarbled * Redistribution and use in source and binary forms, with or without
81.1Sgarbled * modification, are permitted provided that the following conditions
91.1Sgarbled * are met:
101.1Sgarbled * 1. Redistributions of source code must retain the above copyright
111.1Sgarbled *    notice, this list of conditions and the following disclaimer.
121.1Sgarbled * 2. Redistributions in binary form must reproduce the above copyright
131.1Sgarbled *    notice, this list of conditions and the following disclaimer in the
141.1Sgarbled *    documentation and/or other materials provided with the distribution.
151.1Sgarbled * 3. All advertising materials mentioning features or use of this software
161.1Sgarbled *    must display the following acknowledgement:
171.1Sgarbled *      This product includes software developed by Christopher G. Demetriou.
181.1Sgarbled * 4. The name of the author may not be used to endorse or promote products
191.1Sgarbled *    derived from this software without specific prior written permission
201.1Sgarbled *
211.1Sgarbled * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Sgarbled * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Sgarbled * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Sgarbled * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Sgarbled * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Sgarbled * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Sgarbled * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Sgarbled * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Sgarbled * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Sgarbled * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Sgarbled */
321.1Sgarbled
331.1Sgarbled#ifndef _MACHINE_DISKLABEL_H_
341.1Sgarbled#define _MACHINE_DISKLABEL_H_
351.1Sgarbled
361.3Sbouyer#define LABELUSESMBR	0		/* no MBR partitionning */
371.1Sgarbled#define	LABELSECTOR	1		/* sector containing label */
381.1Sgarbled#define	LABELOFFSET	0		/* offset of label in sector */
391.1Sgarbled#define	MAXPARTITIONS	16		/* number of partitions */
401.1Sgarbled#define	RAW_PART	2		/* raw partition: xx?c */
411.1Sgarbled
421.1Sgarbled#if HAVE_NBTOOL_CONFIG_H
431.1Sgarbled#include <nbinclude/sys/bootblock.h> /* Pull in MBR partition definitions. */
441.1Sgarbled#include <nbinclude/sys/dkbad.h>
451.1Sgarbled#else
461.1Sgarbled#include <sys/bootblock.h> /* Pull in MBR partition definitions. */
471.1Sgarbled#include <sys/dkbad.h>
481.1Sgarbled#endif /* HAVE_NBTOOL_CONFIG_H */
491.1Sgarbledstruct cpu_disklabel {
501.4Schristos	struct mbr_partition mbrparts[MBR_PART_COUNT];
511.2Spooka#define __HAVE_DISKLABEL_DKBAD
521.1Sgarbled	struct dkbad bad;
531.1Sgarbled};
541.1Sgarbled
551.1Sgarbled#endif /* _MACHINE_DISKLABEL_H_ */
56