disklabel.h revision 1.11
11.11Sbouyer/*	$NetBSD: disklabel.h,v 1.11 2011/08/30 12:39:53 bouyer 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.11Sbouyer#define LABELUSESMBR	1		/* use MBR partitionning */
391.4Ssoda#define	LABELSECTOR	1		/* sector containing label */
401.4Ssoda#define	LABELOFFSET	0		/* offset of label in sector */
411.4Ssoda#define	MAXPARTITIONS	16		/* number of partitions */
421.4Ssoda#define	RAW_PART	3		/* raw partition: ie. XX?d (XXX) */
431.4Ssoda
441.4Ssoda#define	OPENBSD_RAW_PART 2		/* raw partition: XX?c */
451.4Ssoda
461.4Ssoda/* Pull in MBR partition definitions. */
471.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
481.8Sdyoung#include <nbinclude/sys/bootblock.h>
491.8Sdyoung#else
501.7Slukem#include <sys/bootblock.h>
511.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
521.1Sjonathan
531.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
541.8Sdyoung#include <nbinclude/sys/dkbad.h>
551.8Sdyoung#else
561.1Sjonathan#include <sys/dkbad.h>
571.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
581.1Sjonathanstruct cpu_disklabel {
591.7Slukem	struct mbr_partition dosparts[MBR_PART_COUNT];
601.10Spooka#define __HAVE_DISKLABEL_DKBAD
611.1Sjonathan	struct dkbad bad;
621.1Sjonathan};
631.1Sjonathan
641.1Sjonathan#endif /* _MACHINE_DISKLABEL_H_ */
65