disklabel.h revision 1.4
11.4Slukem/* $NetBSD: disklabel.h,v 1.4 2003/10/08 04:25:44 lukem Exp $ */ 21.1Sbjh21 31.1Sbjh21/* 41.1Sbjh21 * Copyright (c) 1994 Mark Brinicombe. 51.1Sbjh21 * Copyright (c) 1994 Brini. 61.1Sbjh21 * All rights reserved. 71.1Sbjh21 * 81.1Sbjh21 * This code is derived from software written for Brini by Mark Brinicombe 91.1Sbjh21 * 101.1Sbjh21 * Redistribution and use in source and binary forms, with or without 111.1Sbjh21 * modification, are permitted provided that the following conditions 121.1Sbjh21 * are met: 131.1Sbjh21 * 1. Redistributions of source code must retain the above copyright 141.1Sbjh21 * notice, this list of conditions and the following disclaimer. 151.1Sbjh21 * 2. Redistributions in binary form must reproduce the above copyright 161.1Sbjh21 * notice, this list of conditions and the following disclaimer in the 171.1Sbjh21 * documentation and/or other materials provided with the distribution. 181.1Sbjh21 * 3. All advertising materials mentioning features or use of this software 191.1Sbjh21 * must display the following acknowledgement: 201.1Sbjh21 * This product includes software developed by Brini. 211.1Sbjh21 * 4. The name of the company nor the name of the author may be used to 221.1Sbjh21 * endorse or promote products derived from this software without specific 231.1Sbjh21 * prior written permission. 241.1Sbjh21 * 251.1Sbjh21 * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED 261.1Sbjh21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 271.1Sbjh21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 281.1Sbjh21 * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 291.1Sbjh21 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 301.1Sbjh21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 311.1Sbjh21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 321.1Sbjh21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 331.1Sbjh21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 341.1Sbjh21 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 351.1Sbjh21 * SUCH DAMAGE. 361.1Sbjh21 * 371.1Sbjh21 * RiscBSD kernel project 381.1Sbjh21 * 391.1Sbjh21 * disklabel.h 401.1Sbjh21 * 411.1Sbjh21 * machine specific disk label info 421.1Sbjh21 * 431.1Sbjh21 * Created : 04/10/94 441.1Sbjh21 */ 451.1Sbjh21 461.2Sthorpej#ifndef _ARM_DISKLABEL_H_ 471.2Sthorpej#define _ARM_DISKLABEL_H_ 481.1Sbjh21 491.1Sbjh21#define LABELSECTOR 1 /* sector containing label */ 501.1Sbjh21#define LABELOFFSET 0 /* offset of label in sector */ 511.1Sbjh21#define MAXPARTITIONS 8 /* number of partitions */ 521.1Sbjh21#define RAW_PART 2 /* raw partition: XX?c */ 531.1Sbjh21 541.1Sbjh21#include <sys/dkbad.h> 551.2Sthorpej#include <sys/disklabel_acorn.h> 561.4Slukem#include <sys/bootblock.h> 571.1Sbjh21 581.1Sbjh21struct cpu_disklabel { 591.4Slukem struct mbr_partition mbrparts[MBR_PART_COUNT]; 601.1Sbjh21 struct dkbad bad; 611.1Sbjh21}; 621.1Sbjh21 631.1Sbjh21#ifdef _KERNEL 641.1Sbjh21struct buf; 651.1Sbjh21struct disklabel; 661.1Sbjh21 671.1Sbjh21/* for readdisklabel. rv != 0 -> matches, msg == NULL -> success */ 681.1Sbjh21int mbr_label_read __P((dev_t, void (*)(struct buf *), struct disklabel *, 691.1Sbjh21 struct cpu_disklabel *, char **, int *, int *)); 701.1Sbjh21 711.1Sbjh21/* for writedisklabel. rv == 0 -> dosen't match, rv > 0 -> success */ 721.1Sbjh21int mbr_label_locate __P((dev_t, void (*)(struct buf *), 731.1Sbjh21 struct disklabel *, struct cpu_disklabel *, int *, int *)); 741.1Sbjh21#endif /* _KERNEL */ 751.1Sbjh21 761.2Sthorpej#endif /* _ARM_DISKLABEL_H_ */ 77