disklabel.h revision 1.4
11.4Ssoda/*	$NetBSD: disklabel.h,v 1.4 2000/01/23 21:01:56 soda Exp $	*/
21.4Ssoda/*	$OpenBSD: disklabel.h,v 1.6 1997/04/10 13:06:25 deraadt 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.4Ssoda#include <sys/disklabel_mbr.h>
471.4Ssoda/* XXX - should move to <sys/disklabel_mbr.h> */
481.4Ssoda#define	MBR_PTYPE_OPENBSD	0xa6	/* OpenBSD partition type */
491.4Ssoda#define MBR_PTYPE_ONTRACK	0x54
501.1Sjonathan
511.1Sjonathan#include <sys/dkbad.h>
521.1Sjonathanstruct cpu_disklabel {
531.4Ssoda	struct mbr_partition dosparts[NMBRPART];
541.1Sjonathan	struct dkbad bad;
551.1Sjonathan};
561.1Sjonathan
571.1Sjonathan#ifdef _KERNEL
581.1Sjonathanstruct disklabel;
591.1Sjonathanint	bounds_check_with_label __P((struct buf *, struct disklabel *, int));
601.1Sjonathan#endif
611.1Sjonathan
621.1Sjonathan#endif /* _MACHINE_DISKLABEL_H_ */
63