1305162Sjkim/* $NetBSD: disklabel.h,v 1.9 2014/03/31 11:25:49 martin Exp $ */ 2305162Sjkim 3305162Sjkim/* 4305162Sjkim * Copyright (c) 1994 Christopher G. Demetriou 5305162Sjkim * All rights reserved. 6305162Sjkim * 7316303Sjkim * Redistribution and use in source and binary forms, with or without 8316303Sjkim * modification, are permitted provided that the following conditions 9316303Sjkim * are met: 10316303Sjkim * 1. Redistributions of source code must retain the above copyright 11316303Sjkim * notice, this list of conditions and the following disclaimer. 12305162Sjkim * 2. Redistributions in binary form must reproduce the above copyright 13305162Sjkim * notice, this list of conditions and the following disclaimer in the 14316303Sjkim * documentation and/or other materials provided with the distribution. 15316303Sjkim * 3. All advertising materials mentioning features or use of this software 16316303Sjkim * must display the following acknowledgement: 17316303Sjkim * This product includes software developed by Christopher G. Demetriou. 18316303Sjkim * 4. The name of the author may not be used to endorse or promote products 19316303Sjkim * derived from this software without specific prior written permission 20316303Sjkim * 21316303Sjkim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22316303Sjkim * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23316303Sjkim * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24316303Sjkim * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25316303Sjkim * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26316303Sjkim * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27316303Sjkim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28316303Sjkim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29316303Sjkim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30316303Sjkim * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31316303Sjkim */ 32316303Sjkim 33316303Sjkim#ifndef _PLAYSTATION2_DISKLABEL_H_ 34316303Sjkim#define _PLAYSTATION2_DISKLABEL_H_ 35316303Sjkim 36316303Sjkim#define LABELUSESMBR 1 /* use MBR partitionning */ 37316303Sjkim#define LABELSECTOR 1 /* sector containing label */ 38316303Sjkim#define LABELOFFSET 0 /* offset of label in sector */ 39316303Sjkim#define MAXPARTITIONS 16 /* number of partitions */ 40316303Sjkim#define RAW_PART 2 41316303Sjkim 42316303Sjkim/* Pull in MBR partition definitions. */ 43316303Sjkim#if HAVE_NBTOOL_CONFIG_H 44316303Sjkim#include <nbinclude/sys/bootblock.h> 45316303Sjkim#else 46316303Sjkim#include <sys/bootblock.h> 47316303Sjkim#endif /* HAVE_NBTOOL_CONFIG_H */ 48316303Sjkim 49316303Sjkim#ifndef __ASSEMBLER__ 50316303Sjkim#if HAVE_NBTOOL_CONFIG_H 51316303Sjkim#include <nbinclude/sys/dkbad.h> 52316303Sjkim#else 53316303Sjkim#include <sys/dkbad.h> 54316303Sjkim#endif /* HAVE_NBTOOL_CONFIG_H */ 55316303Sjkimstruct cpu_disklabel { 56316303Sjkim struct mbr_partition dosparts[MBR_PART_COUNT]; 57316303Sjkim#define __HAVE_DISKLABEL_DKBAD 58316303Sjkim struct dkbad bad; 59316303Sjkim}; 60316303Sjkim#endif 61316303Sjkim 62316303Sjkim#endif /* _PLAYSTATION2_DISKLABEL_H_ */ 63316303Sjkim