disklabel.h revision 1.4
11.4Scgd/* $NetBSD: disklabel.h,v 1.4 1999/04/02 07:32:33 cgd Exp $ */ 21.1Scgd 31.1Scgd/* 41.4Scgd * Copyright (c) 1994, 1999 Christopher G. Demetriou 51.1Scgd * All rights reserved. 61.1Scgd * 71.1Scgd * Redistribution and use in source and binary forms, with or without 81.1Scgd * modification, are permitted provided that the following conditions 91.1Scgd * are met: 101.1Scgd * 1. Redistributions of source code must retain the above copyright 111.1Scgd * notice, this list of conditions and the following disclaimer. 121.1Scgd * 2. Redistributions in binary form must reproduce the above copyright 131.1Scgd * notice, this list of conditions and the following disclaimer in the 141.1Scgd * documentation and/or other materials provided with the distribution. 151.1Scgd * 3. All advertising materials mentioning features or use of this software 161.1Scgd * must display the following acknowledgement: 171.4Scgd * This product includes software developed by Christopher G. Demetriou 181.4Scgd * for the NetBSD Project. 191.1Scgd * 4. The name of the author may not be used to endorse or promote products 201.1Scgd * derived from this software without specific prior written permission 211.1Scgd * 221.1Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 231.1Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 241.1Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 261.1Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 271.1Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 281.1Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 291.1Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 301.1Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 311.1Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 321.1Scgd */ 331.1Scgd 341.1Scgd#ifndef _MACHINE_DISKLABEL_H_ 351.1Scgd#define _MACHINE_DISKLABEL_H_ 361.1Scgd 371.1Scgd#define LABELSECTOR 0 /* sector containing label */ 381.1Scgd#define LABELOFFSET 64 /* offset of label in sector */ 391.1Scgd#define MAXPARTITIONS 8 /* number of partitions */ 401.1Scgd#define RAW_PART 2 /* raw partition: xx?c */ 411.1Scgd 421.2Scgd#include <sys/dkbad.h> 431.2Scgd 441.1Scgd/* Just a dummy */ 451.1Scgdstruct cpu_disklabel { 461.2Scgd struct dkbad bad; /* bad-sector information */ 471.1Scgd}; 481.4Scgd 491.4Scgd/* 501.4Scgd * Alpha (disk, but also tape) Boot Block. See Section (III) 3.6.1 of the 511.4Scgd * Alpha Architecture Reference Manual. 521.4Scgd */ 531.4Scgd 541.4Scgdstruct boot_block { 551.4Scgd u_int64_t bb_pad[60]; /* disklabel lives in here */ 561.4Scgd u_int64_t bb_secsize; /* secondary size (blocks) */ 571.4Scgd u_int64_t bb_secstart; /* secondary start (blocks) */ 581.4Scgd u_int64_t bb_flags; /* unknown; always zero */ 591.4Scgd u_int64_t bb_cksum; /* checksum of the the boot block, 601.4Scgd * taken as u_int64_t's 611.4Scgd */ 621.4Scgd}; 631.4Scgd 641.4Scgd#define BOOT_BLOCK_BLOCKSIZE 512 /* block size for sec. size/start */ 651.1Scgd 661.1Scgd#endif /* _MACHINE_DISKLABEL_H_ */ 67