disklabel.h revision 1.7
11.7Sgarbled/*	$NetBSD: disklabel.h,v 1.7 2007/10/17 19:56:07 garbled Exp $	*/
21.1Sws
31.1Sws/*-
41.1Sws * Copyright (C) 1995, 1996 Wolfgang Solfrank.
51.1Sws * Copyright (C) 1995, 1996 TooLs GmbH.
61.1Sws * All rights reserved.
71.1Sws *
81.1Sws * Redistribution and use in source and binary forms, with or without
91.1Sws * modification, are permitted provided that the following conditions
101.1Sws * are met:
111.1Sws * 1. Redistributions of source code must retain the above copyright
121.1Sws *    notice, this list of conditions and the following disclaimer.
131.1Sws * 2. Redistributions in binary form must reproduce the above copyright
141.1Sws *    notice, this list of conditions and the following disclaimer in the
151.1Sws *    documentation and/or other materials provided with the distribution.
161.1Sws * 3. All advertising materials mentioning features or use of this software
171.1Sws *    must display the following acknowledgement:
181.1Sws *	This product includes software developed by TooLs GmbH.
191.1Sws * 4. The name of TooLs GmbH may not be used to endorse or promote products
201.1Sws *    derived from this software without specific prior written permission.
211.1Sws *
221.1Sws * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
231.1Sws * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
241.1Sws * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
251.1Sws * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
261.1Sws * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
271.1Sws * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
281.1Sws * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
291.1Sws * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
301.1Sws * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
311.1Sws * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321.1Sws */
331.1Sws
341.1Sws#ifndef	_MACHINE_DISKLABEL_H_
351.1Sws#define	_MACHINE_DISKLABEL_H_
361.1Sws
371.1Sws#define	LABELSECTOR	1		/* sector containing label */
381.1Sws#define	LABELOFFSET	0		/* offset of label in sector */
391.1Sws#define	MAXPARTITIONS	16		/* number of partitions */
401.1Sws#define	RAW_PART	2		/* raw partition: XX?c */
411.1Sws
421.7Sgarbled#if HAVE_NBTOOL_CONFIG_H
431.7Sgarbled#include <nbinclude/sys/bootblock.h> /* Pull in MBR partition definitions. */
441.7Sgarbled#include <nbinclude/sys/dkbad.h>
451.7Sgarbled#else
461.7Sgarbled#include <sys/bootblock.h> /* Pull in MBR partition definitions. */
471.7Sgarbled#include <sys/dkbad.h>
481.7Sgarbled#endif /* HAVE_NBTOOL_CONFIG_H */
491.7Sgarbled
501.1Swsstruct cpu_disklabel {
511.7Sgarbled	struct mbr_partition dosparts[MBR_PART_COUNT];
521.7Sgarbled	struct dkbad bad;
531.1Sws};
541.1Sws
551.1Sws#endif	/* _MACHINE_DISKLABEL_H_ */
56