1*a47e2eb7Sbouyer /* $NetBSD: disklabel.h,v 1.3 2011/08/30 12:39:56 bouyer Exp $ */ 295d00ea7Snisimura 395d00ea7Snisimura /* 495d00ea7Snisimura * Copyright (c) 1994 Christopher G. Demetriou 595d00ea7Snisimura * All rights reserved. 695d00ea7Snisimura * 795d00ea7Snisimura * Redistribution and use in source and binary forms, with or without 895d00ea7Snisimura * modification, are permitted provided that the following conditions 995d00ea7Snisimura * are met: 1095d00ea7Snisimura * 1. Redistributions of source code must retain the above copyright 1195d00ea7Snisimura * notice, this list of conditions and the following disclaimer. 1295d00ea7Snisimura * 2. Redistributions in binary form must reproduce the above copyright 1395d00ea7Snisimura * notice, this list of conditions and the following disclaimer in the 1495d00ea7Snisimura * documentation and/or other materials provided with the distribution. 1595d00ea7Snisimura * 3. All advertising materials mentioning features or use of this software 1695d00ea7Snisimura * must display the following acknowledgement: 1795d00ea7Snisimura * This product includes software developed by Christopher G. Demetriou. 1895d00ea7Snisimura * 4. The name of the author may not be used to endorse or promote products 1995d00ea7Snisimura * derived from this software without specific prior written permission 2095d00ea7Snisimura * 2195d00ea7Snisimura * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2295d00ea7Snisimura * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2395d00ea7Snisimura * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2495d00ea7Snisimura * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2595d00ea7Snisimura * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2695d00ea7Snisimura * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2795d00ea7Snisimura * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2895d00ea7Snisimura * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2995d00ea7Snisimura * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3095d00ea7Snisimura * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3195d00ea7Snisimura */ 3295d00ea7Snisimura 3395d00ea7Snisimura #ifndef _MACHINE_DISKLABEL_H_ 3495d00ea7Snisimura #define _MACHINE_DISKLABEL_H_ 3595d00ea7Snisimura 36*a47e2eb7Sbouyer #define LABELUSESMBR 0 /* no MBR partitionning */ 3795d00ea7Snisimura #define LABELSECTOR 0 /* sector containing label */ 3895d00ea7Snisimura #define LABELOFFSET 64 /* offset of label in sector */ 3995d00ea7Snisimura #define MAXPARTITIONS 8 /* number of partitions */ 4095d00ea7Snisimura #define RAW_PART 2 /* raw partition: xx?c */ 4195d00ea7Snisimura 4295d00ea7Snisimura /* 4395d00ea7Snisimura * This holds a copy of the whole label block, saved in here by 4495d00ea7Snisimura * readdisklabel() so that writedisklabel() can preserve the 4595d00ea7Snisimura * parts of the label block outside of the actual label. 4695d00ea7Snisimura * (i.e. Sun label info, bad block table, etc.) 4795d00ea7Snisimura */ 4895d00ea7Snisimura struct cpu_disklabel { 4995d00ea7Snisimura char cd_block[512]; 5095d00ea7Snisimura }; 5195d00ea7Snisimura 5295d00ea7Snisimura #endif /* _MACHINE_DISKLABEL_H_ */ 53