disklabel.h revision 1.10
11.10Spooka/*	$NetBSD: disklabel.h,v 1.10 2009/11/23 13:40:09 pooka Exp $	*/
21.4Ssoren
31.4Ssoren/*
41.4Ssoren * Copyright (c) 1994 Christopher G. Demetriou
51.4Ssoren * All rights reserved.
61.4Ssoren *
71.4Ssoren * Redistribution and use in source and binary forms, with or without
81.4Ssoren * modification, are permitted provided that the following conditions
91.4Ssoren * are met:
101.4Ssoren * 1. Redistributions of source code must retain the above copyright
111.4Ssoren *    notice, this list of conditions and the following disclaimer.
121.4Ssoren * 2. Redistributions in binary form must reproduce the above copyright
131.4Ssoren *    notice, this list of conditions and the following disclaimer in the
141.4Ssoren *    documentation and/or other materials provided with the distribution.
151.4Ssoren * 3. All advertising materials mentioning features or use of this software
161.4Ssoren *    must display the following acknowledgement:
171.4Ssoren *      This product includes software developed by Christopher G. Demetriou.
181.4Ssoren * 4. The name of the author may not be used to endorse or promote products
191.4Ssoren *    derived from this software without specific prior written permission
201.4Ssoren *
211.4Ssoren * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.4Ssoren * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.4Ssoren * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.4Ssoren * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.4Ssoren * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.4Ssoren * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.4Ssoren * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.4Ssoren * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.4Ssoren * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.4Ssoren * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.4Ssoren */
321.3Ssoren
331.3Ssoren#ifndef _MACHINE_DISKLABEL_H_
341.3Ssoren#define _MACHINE_DISKLABEL_H_
351.1Ssoren
361.2Ssoren#define LABELSECTOR	1		/* sector containing label */
371.2Ssoren#define LABELOFFSET	0		/* offset of label in sector */
381.1Ssoren#define MAXPARTITIONS	16
391.1Ssoren#define RAW_PART	3
401.1Ssoren
411.1Ssoren/* Pull in MBR partition definitions. */
421.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
431.8Sdyoung#include <nbinclude/sys/bootblock.h>
441.8Sdyoung#else
451.7Slukem#include <sys/bootblock.h>
461.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
471.6Stsutsui
481.6Stsutsui#ifndef __ASSEMBLER__
491.8Sdyoung#if HAVE_NBTOOL_CONFIG_H
501.8Sdyoung#include <nbinclude/sys/dkbad.h>
511.8Sdyoung#else
521.5Ssoren#include <sys/dkbad.h>
531.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */
541.1Ssorenstruct cpu_disklabel {
551.7Slukem	struct mbr_partition dosparts[MBR_PART_COUNT];
561.10Spooka#define __HAVE_DISKLABEL_DKBAD
571.6Stsutsui	struct dkbad bad;
581.1Ssoren};
591.1Ssoren#endif
601.3Ssoren
611.3Ssoren#endif /* _MACHINE_DISKLABEL_H_ */
62