1*fbea3604Smartin /* $NetBSD: disklabel.h,v 1.10 2014/04/01 14:09:14 martin Exp $ */ 2768423b8Smartin 3768423b8Smartin /* 4768423b8Smartin * Copyright (c) 1994 Christopher G. Demetriou 5768423b8Smartin * All rights reserved. 6768423b8Smartin * 7768423b8Smartin * Redistribution and use in source and binary forms, with or without 8768423b8Smartin * modification, are permitted provided that the following conditions 9768423b8Smartin * are met: 10768423b8Smartin * 1. Redistributions of source code must retain the above copyright 11768423b8Smartin * notice, this list of conditions and the following disclaimer. 12768423b8Smartin * 2. Redistributions in binary form must reproduce the above copyright 13768423b8Smartin * notice, this list of conditions and the following disclaimer in the 14768423b8Smartin * documentation and/or other materials provided with the distribution. 15768423b8Smartin * 3. All advertising materials mentioning features or use of this software 16768423b8Smartin * must display the following acknowledgement: 17768423b8Smartin * This product includes software developed by Christopher G. Demetriou. 18768423b8Smartin * 4. The name of the author may not be used to endorse or promote products 19768423b8Smartin * derived from this software without specific prior written permission 20768423b8Smartin * 21768423b8Smartin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22768423b8Smartin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23768423b8Smartin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24768423b8Smartin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25768423b8Smartin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26768423b8Smartin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27768423b8Smartin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28768423b8Smartin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29768423b8Smartin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30768423b8Smartin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31768423b8Smartin */ 32768423b8Smartin 33768423b8Smartin #ifndef _PLAYSTATION2_DISKLABEL_H_ 34768423b8Smartin #define _PLAYSTATION2_DISKLABEL_H_ 35768423b8Smartin 36*fbea3604Smartin #define LABELUSESMBR 1 /* use MBR partitionning */ 37768423b8Smartin #define LABELSECTOR 1 /* sector containing label */ 38768423b8Smartin #define LABELOFFSET 0 /* offset of label in sector */ 39768423b8Smartin #define MAXPARTITIONS 16 /* number of partitions */ 40768423b8Smartin #define RAW_PART 2 41768423b8Smartin 42768423b8Smartin /* Pull in MBR partition definitions. */ 43768423b8Smartin #if HAVE_NBTOOL_CONFIG_H 44768423b8Smartin #include <nbinclude/sys/bootblock.h> 45768423b8Smartin #else 46768423b8Smartin #include <sys/bootblock.h> 47768423b8Smartin #endif /* HAVE_NBTOOL_CONFIG_H */ 48768423b8Smartin 49768423b8Smartin #ifndef __ASSEMBLER__ 50768423b8Smartin #if HAVE_NBTOOL_CONFIG_H 51768423b8Smartin #include <nbinclude/sys/dkbad.h> 52768423b8Smartin #else 53768423b8Smartin #include <sys/dkbad.h> 54768423b8Smartin #endif /* HAVE_NBTOOL_CONFIG_H */ 55768423b8Smartin struct cpu_disklabel { 56768423b8Smartin struct mbr_partition dosparts[MBR_PART_COUNT]; 57768423b8Smartin #define __HAVE_DISKLABEL_DKBAD 58768423b8Smartin struct dkbad bad; 59768423b8Smartin }; 60768423b8Smartin #endif 61768423b8Smartin 62768423b8Smartin #endif /* _PLAYSTATION2_DISKLABEL_H_ */ 63