xref: /netbsd-src/sys/arch/landisk/include/disklabel.h (revision 2ec4fd84baea86ae2980e4abc96d967a585dafb7)
1*2ec4fd84Schristos /*	$NetBSD: disklabel.h,v 1.4 2013/05/16 19:06:45 christos Exp $	*/
21fd097bfSuwe 
31fd097bfSuwe /*
41fd097bfSuwe  * Copyright (c) 1994 Christopher G. Demetriou
51fd097bfSuwe  * All rights reserved.
61fd097bfSuwe  *
71fd097bfSuwe  * Redistribution and use in source and binary forms, with or without
81fd097bfSuwe  * modification, are permitted provided that the following conditions
91fd097bfSuwe  * are met:
101fd097bfSuwe  * 1. Redistributions of source code must retain the above copyright
111fd097bfSuwe  *    notice, this list of conditions and the following disclaimer.
121fd097bfSuwe  * 2. Redistributions in binary form must reproduce the above copyright
131fd097bfSuwe  *    notice, this list of conditions and the following disclaimer in the
141fd097bfSuwe  *    documentation and/or other materials provided with the distribution.
151fd097bfSuwe  * 3. All advertising materials mentioning features or use of this software
161fd097bfSuwe  *    must display the following acknowledgement:
171fd097bfSuwe  *      This product includes software developed by Christopher G. Demetriou.
181fd097bfSuwe  * 4. The name of the author may not be used to endorse or promote products
191fd097bfSuwe  *    derived from this software without specific prior written permission
201fd097bfSuwe  *
211fd097bfSuwe  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221fd097bfSuwe  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231fd097bfSuwe  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241fd097bfSuwe  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251fd097bfSuwe  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261fd097bfSuwe  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271fd097bfSuwe  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281fd097bfSuwe  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291fd097bfSuwe  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301fd097bfSuwe  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311fd097bfSuwe  */
321fd097bfSuwe 
331fd097bfSuwe #ifndef _LANDISK_DISKLABEL_H_
341fd097bfSuwe #define	_LANDISK_DISKLABEL_H_
351fd097bfSuwe 
36a47e2eb7Sbouyer #define LABELUSESMBR	1		/* use MBR partitionning */
371fd097bfSuwe #define	LABELSECTOR	1		/* sector containing label */
381fd097bfSuwe #define	LABELOFFSET	0		/* offset of label in sector */
391fd097bfSuwe #define	MAXPARTITIONS	16		/* number of partitions */
401fd097bfSuwe #define	RAW_PART	3		/* raw partition: xx?d */
411fd097bfSuwe 
421fd097bfSuwe /* Pull in MBR partition definitions. */
431fd097bfSuwe #if HAVE_NBTOOL_CONFIG_H
441fd097bfSuwe #include <nbinclude/sys/bootblock.h>
451fd097bfSuwe #else
461fd097bfSuwe #include <sys/bootblock.h>
471fd097bfSuwe #endif /* HAVE_NBTOOL_CONFIG_H */
481fd097bfSuwe 
491fd097bfSuwe #ifndef __ASSEMBLER__
501fd097bfSuwe #if HAVE_NBTOOL_CONFIG_H
511fd097bfSuwe #include <nbinclude/sys/dkbad.h>
521fd097bfSuwe #else
531fd097bfSuwe #include <sys/dkbad.h>
541fd097bfSuwe #endif /* HAVE_NBTOOL_CONFIG_H */
551fd097bfSuwe 
561fd097bfSuwe struct cpu_disklabel {
57*2ec4fd84Schristos 	struct mbr_partition mbrparts[MBR_PART_COUNT];
5809dbb89bSpooka #define __HAVE_DISKLABEL_DKBAD
591fd097bfSuwe 	struct dkbad bad;
601fd097bfSuwe };
611fd097bfSuwe #endif	/* __ASSEMBLER__ */
621fd097bfSuwe 
631fd097bfSuwe #endif /* _LANDISK_DISKLABEL_H_ */
64