disklabel.h revision 1.8
11.8Sdyoung/*	$NetBSD: disklabel.h,v 1.8 2005/06/12 19:46:15 dyoung Exp $	*/
21.5Ssoda/*	$OpenBSD: disklabel.h,v 1.14 1999/03/23 16:36:17 millert Exp $	*/
31.4Ssoda/*	NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp 	*/
41.1Sjonathan
51.1Sjonathan/*
61.1Sjonathan * Copyright (c) 1994 Christopher G. Demetriou
71.1Sjonathan * All rights reserved.
81.1Sjonathan *
91.1Sjonathan * Redistribution and use in source and binary forms, with or without
101.1Sjonathan * modification, are permitted provided that the following conditions
111.1Sjonathan * are met:
121.1Sjonathan * 1. Redistributions of source code must retain the above copyright
131.1Sjonathan *    notice, this list of conditions and the following disclaimer.
141.1Sjonathan * 2. Redistributions in binary form must reproduce the above copyright
151.1Sjonathan *    notice, this list of conditions and the following disclaimer in the
161.1Sjonathan *    documentation and/or other materials provided with the distribution.
171.1Sjonathan * 3. All advertising materials mentioning features or use of this software
181.1Sjonathan *    must display the following acknowledgement:
191.1Sjonathan *      This product includes software developed by Christopher G. Demetriou.
201.1Sjonathan * 4. The name of the author may not be used to endorse or promote products
211.1Sjonathan *    derived from this software without specific prior written permission
221.1Sjonathan *
231.1Sjonathan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Sjonathan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Sjonathan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Sjonathan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Sjonathan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.1Sjonathan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.1Sjonathan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.1Sjonathan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.1Sjonathan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.1Sjonathan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.1Sjonathan */
341.1Sjonathan
351.1Sjonathan#ifndef _MACHINE_DISKLABEL_H_
361.1Sjonathan#define _MACHINE_DISKLABEL_H_
371.1Sjonathan
381.4Ssoda#define	LABELSECTOR	1		/* sector containing label */
391.4Ssoda#define	LABELOFFSET	0		/* offset of label in sector */
401.4Ssoda#define	MAXPARTITIONS	16		/* number of partitions */
411.4Ssoda#define	RAW_PART	3		/* raw partition: ie. XX?d (XXX) */
421.4Ssoda
431.4Ssoda#define	OPENBSD_RAW_PART 2		/* raw partition: XX?c */
441.4Ssoda
451.4Ssoda/* Pull in MBR partition definitions. */
461.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
471.8Sdyoung#include <nbinclude/sys/bootblock.h>
481.8Sdyoung#else
491.7Slukem#include <sys/bootblock.h>
501.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
511.1Sjonathan
521.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
531.8Sdyoung#include <nbinclude/sys/dkbad.h>
541.8Sdyoung#else
551.1Sjonathan#include <sys/dkbad.h>
561.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
571.1Sjonathanstruct cpu_disklabel {
581.7Slukem	struct mbr_partition dosparts[MBR_PART_COUNT];
591.1Sjonathan	struct dkbad bad;
601.1Sjonathan};
611.1Sjonathan
621.1Sjonathan#endif /* _MACHINE_DISKLABEL_H_ */
63