11.3Sbouyer/* $NetBSD: disklabel.h,v 1.3 2011/08/30 12:39:53 bouyer Exp $ */ 21.1Sis 31.1Sis/* 41.1Sis * Copyright (c) 1994 Christian E. Hopps 51.1Sis * All rights reserved. 61.1Sis * 71.1Sis * Redistribution and use in source and binary forms, with or without 81.1Sis * modification, are permitted provided that the following conditions 91.1Sis * are met: 101.1Sis * 1. Redistributions of source code must retain the above copyright 111.1Sis * notice, this list of conditions and the following disclaimer. 121.1Sis * 2. Redistributions in binary form must reproduce the above copyright 131.1Sis * notice, this list of conditions and the following disclaimer in the 141.1Sis * documentation and/or other materials provided with the distribution. 151.1Sis * 3. All advertising materials mentioning features or use of this software 161.1Sis * must display the following acknowledgement: 171.1Sis * This product includes software developed by Christian E. Hopps. 181.1Sis * 4. The name of the author may not be used to endorse or promote products 191.1Sis * derived from this software without specific prior written permission 201.1Sis * 211.1Sis * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Sis * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Sis * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Sis * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Sis * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Sis * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Sis * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Sis * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Sis * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Sis * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Sis */ 321.1Sis#ifndef _MACHINE_DISKLABEL_H_ 331.1Sis#define _MACHINE_DISKLABEL_H_ 341.1Sis 351.3Sbouyer#define LABELUSESMBR 0 /* no MBR partitionning */ 361.1Sis#define LABELSECTOR 0 /* sector containing label */ 371.1Sis#define LABELOFFSET 64 /* offset of label in sector */ 381.1Sis#define MAXPARTITIONS 16 /* number of partitions */ 391.1Sis#define RAW_PART 2 /* raw partition: xx?c */ 401.1Sis 411.2Sphx/* Pull in RDB partition definitions. */ 421.2Sphx#if HAVE_NBTOOL_CONFIG_H 431.2Sphx#include <nbinclude/sys/disklabel_rdb.h> 441.2Sphx#else 451.2Sphx#include <sys/disklabel_rdb.h> 461.2Sphx#endif /* HAVE_NBTOOL_CONFIG_H */ 471.1Sis 481.1Sisstruct cpu_disklabel { 491.1Sis u_long rdblock; /* may be RDBNULL which invalidates */ 501.1Sis u_long pblist[MAXPARTITIONS]; /* partblock number (RDB list order) */ 511.1Sis int pbindex[MAXPARTITIONS]; /* index of pblock (partition order) */ 521.1Sis int valid; /* essential that this is valid */ 531.1Sis}; 541.1Sis 551.1Sis#endif /* _MACHINE_DISKLABEL_H_ */ 56