disklabel.h revision 1.11
11.11Sbouyer/* $NetBSD: disklabel.h,v 1.11 2011/08/30 12:39:54 bouyer 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.11Sbouyer#define LABELUSESMBR 1 /* use MBR partitionning */ 371.2Ssoren#define LABELSECTOR 1 /* sector containing label */ 381.2Ssoren#define LABELOFFSET 0 /* offset of label in sector */ 391.1Ssoren#define MAXPARTITIONS 16 401.1Ssoren#define RAW_PART 3 411.1Ssoren 421.1Ssoren/* Pull in MBR partition definitions. */ 431.8Sdyoung#if HAVE_NBTOOL_CONFIG_H 441.8Sdyoung#include <nbinclude/sys/bootblock.h> 451.8Sdyoung#else 461.7Slukem#include <sys/bootblock.h> 471.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */ 481.6Stsutsui 491.6Stsutsui#ifndef __ASSEMBLER__ 501.8Sdyoung#if HAVE_NBTOOL_CONFIG_H 511.8Sdyoung#include <nbinclude/sys/dkbad.h> 521.8Sdyoung#else 531.5Ssoren#include <sys/dkbad.h> 541.8Sdyoung#endif /* HAVE_NBTOOL_CONFIG_H */ 551.1Ssorenstruct cpu_disklabel { 561.7Slukem struct mbr_partition dosparts[MBR_PART_COUNT]; 571.10Spooka#define __HAVE_DISKLABEL_DKBAD 581.6Stsutsui struct dkbad bad; 591.1Ssoren}; 601.1Ssoren#endif 611.3Ssoren 621.3Ssoren#endif /* _MACHINE_DISKLABEL_H_ */ 63