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