disklabel.h revision 1.2
11.2Spooka/*	$NetBSD: disklabel.h,v 1.2 2009/11/23 13:40:10 pooka 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.1Sgarbled#define	LABELSECTOR	1		/* sector containing label */
371.1Sgarbled#define	LABELOFFSET	0		/* offset of label in sector */
381.1Sgarbled#define	MAXPARTITIONS	16		/* number of partitions */
391.1Sgarbled#define	RAW_PART	2		/* raw partition: xx?c */
401.1Sgarbled
411.1Sgarbled#if HAVE_NBTOOL_CONFIG_H
421.1Sgarbled#include <nbinclude/sys/bootblock.h> /* Pull in MBR partition definitions. */
431.1Sgarbled#include <nbinclude/sys/dkbad.h>
441.1Sgarbled#else
451.1Sgarbled#include <sys/bootblock.h> /* Pull in MBR partition definitions. */
461.1Sgarbled#include <sys/dkbad.h>
471.1Sgarbled#endif /* HAVE_NBTOOL_CONFIG_H */
481.1Sgarbledstruct cpu_disklabel {
491.1Sgarbled	struct mbr_partition dosparts[MBR_PART_COUNT];
501.2Spooka#define __HAVE_DISKLABEL_DKBAD
511.1Sgarbled	struct dkbad bad;
521.1Sgarbled};
531.1Sgarbled
541.1Sgarbled#endif /* _MACHINE_DISKLABEL_H_ */
55