155682Smarkm/* $NetBSD: disklabel.h,v 1.3 2011/08/30 12:39:58 bouyer Exp $ */ 2233294Sstas 3233294Sstas/* 4233294Sstas * Copyright (c) 1994 Christopher G. Demetriou 555682Smarkm * All rights reserved. 6233294Sstas * 7233294Sstas * Redistribution and use in source and binary forms, with or without 8233294Sstas * modification, are permitted provided that the following conditions 955682Smarkm * are met: 10233294Sstas * 1. Redistributions of source code must retain the above copyright 11233294Sstas * notice, this list of conditions and the following disclaimer. 1255682Smarkm * 2. Redistributions in binary form must reproduce the above copyright 13233294Sstas * notice, this list of conditions and the following disclaimer in the 14233294Sstas * documentation and/or other materials provided with the distribution. 15233294Sstas * 3. All advertising materials mentioning features or use of this software 1655682Smarkm * must display the following acknowledgement: 17233294Sstas * This product includes software developed by Christopher G. Demetriou. 18233294Sstas * 4. The name of the author may not be used to endorse or promote products 19233294Sstas * derived from this software without specific prior written permission 2055682Smarkm * 21233294Sstas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22233294Sstas * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23233294Sstas * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24233294Sstas * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25233294Sstas * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26233294Sstas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27233294Sstas * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28233294Sstas * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29233294Sstas * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30233294Sstas * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31233294Sstas */ 3255682Smarkm 3355682Smarkm#ifndef _MACHINE_DISKLABEL_H_ 3455682Smarkm#define _MACHINE_DISKLABEL_H_ 3572445Sassar 3655682Smarkm#define LABELUSESMBR 0 /* no MBR partitionning */ 3755682Smarkm#define LABELSECTOR 1 /* sector containing label */ 3855682Smarkm#define LABELOFFSET 0 /* offset of label in sector */ 3955682Smarkm#define MAXPARTITIONS 16 /* number of partitions */ 4055682Smarkm#define RAW_PART 2 /* raw partition: xx?c */ 41233294Sstas 4255682Smarkm#if HAVE_NBTOOL_CONFIG_H 4355682Smarkm#include <nbinclude/sys/bootblock.h> /* Pull in MBR partition definitions. */ 4455682Smarkm#include <nbinclude/sys/dkbad.h> 4555682Smarkm#else 4655682Smarkm#include <sys/bootblock.h> /* Pull in MBR partition definitions. */ 4778527Sassar#include <sys/dkbad.h> 48233294Sstas#endif /* HAVE_NBTOOL_CONFIG_H */ 49233294Sstasstruct cpu_disklabel { 5055682Smarkm struct mbr_partition mbrparts[MBR_PART_COUNT]; 5178527Sassar#define __HAVE_DISKLABEL_DKBAD 5255682Smarkm struct dkbad bad; 5355682Smarkm}; 5455682Smarkm 55233294Sstas#endif /* _MACHINE_DISKLABEL_H_ */ 5655682Smarkm