1*a47e2eb7Sbouyer /* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:58 bouyer Exp $ */ 2c1c742b4Sfredette 3c1c742b4Sfredette /* 4c1c742b4Sfredette * Copyright (c) 1994 Christopher G. Demetriou 5c1c742b4Sfredette * All rights reserved. 6c1c742b4Sfredette * 7c1c742b4Sfredette * Redistribution and use in source and binary forms, with or without 8c1c742b4Sfredette * modification, are permitted provided that the following conditions 9c1c742b4Sfredette * are met: 10c1c742b4Sfredette * 1. Redistributions of source code must retain the above copyright 11c1c742b4Sfredette * notice, this list of conditions and the following disclaimer. 12c1c742b4Sfredette * 2. Redistributions in binary form must reproduce the above copyright 13c1c742b4Sfredette * notice, this list of conditions and the following disclaimer in the 14c1c742b4Sfredette * documentation and/or other materials provided with the distribution. 15c1c742b4Sfredette * 3. All advertising materials mentioning features or use of this software 16c1c742b4Sfredette * must display the following acknowledgement: 17c1c742b4Sfredette * This product includes software developed by Christopher G. Demetriou. 18c1c742b4Sfredette * 4. The name of the author may not be used to endorse or promote products 19c1c742b4Sfredette * derived from this software without specific prior written permission 20c1c742b4Sfredette * 21c1c742b4Sfredette * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22c1c742b4Sfredette * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23c1c742b4Sfredette * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24c1c742b4Sfredette * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25c1c742b4Sfredette * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26c1c742b4Sfredette * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27c1c742b4Sfredette * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28c1c742b4Sfredette * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29c1c742b4Sfredette * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30c1c742b4Sfredette * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31c1c742b4Sfredette */ 32c1c742b4Sfredette 33c1c742b4Sfredette #ifndef _MACHINE_DISKLABEL_H_ 34c1c742b4Sfredette #define _MACHINE_DISKLABEL_H_ 35c1c742b4Sfredette 36*a47e2eb7Sbouyer #define LABELUSESMBR 0 /* no MBR partitionning */ 37c1c742b4Sfredette #define LABELSECTOR 0 /* sector containing label */ 38c1c742b4Sfredette #define LABELOFFSET 64 /* offset of label in sector */ 39c1c742b4Sfredette #define MAXPARTITIONS 8 /* number of partitions */ 40c1c742b4Sfredette #define RAW_PART 2 /* raw partition: xx?c */ 41c1c742b4Sfredette 42c1c742b4Sfredette /* 43c1c742b4Sfredette * This holds a copy of the whole label block, saved in here by 44c1c742b4Sfredette * readdisklabel() so that writedisklabel() can preserve the 45c1c742b4Sfredette * parts of the label block outside of the actual label. 46c1c742b4Sfredette * (i.e. Sun label info, bad block table, etc.) 47c1c742b4Sfredette */ 48c1c742b4Sfredette struct cpu_disklabel { 49c1c742b4Sfredette char cd_block[512]; 50c1c742b4Sfredette }; 51c1c742b4Sfredette 52c1c742b4Sfredette #ifdef _KERNEL 53c1c742b4Sfredette 54c1c742b4Sfredette struct dkbad; 5510b1a7beSchs int isbad(struct dkbad *, int, int, int); 56c1c742b4Sfredette 57c1c742b4Sfredette #endif /* _KERNEL */ 58c1c742b4Sfredette #endif /* _MACHINE_DISKLABEL_H_ */ 59