xref: /netbsd-src/sys/arch/sun3/include/disklabel.h (revision a47e2eb75818146a02ebb0a41df61c325b8d3935)
1*a47e2eb7Sbouyer /*	$NetBSD: disklabel.h,v 1.9 2011/08/30 12:39:58 bouyer Exp $	*/
249c34d33Scgd 
349c34d33Scgd /*
449c34d33Scgd  * Copyright (c) 1994 Christopher G. Demetriou
549c34d33Scgd  * All rights reserved.
649c34d33Scgd  *
749c34d33Scgd  * Redistribution and use in source and binary forms, with or without
849c34d33Scgd  * modification, are permitted provided that the following conditions
949c34d33Scgd  * are met:
1049c34d33Scgd  * 1. Redistributions of source code must retain the above copyright
1149c34d33Scgd  *    notice, this list of conditions and the following disclaimer.
1249c34d33Scgd  * 2. Redistributions in binary form must reproduce the above copyright
1349c34d33Scgd  *    notice, this list of conditions and the following disclaimer in the
1449c34d33Scgd  *    documentation and/or other materials provided with the distribution.
1549c34d33Scgd  * 3. All advertising materials mentioning features or use of this software
1649c34d33Scgd  *    must display the following acknowledgement:
1749c34d33Scgd  *      This product includes software developed by Christopher G. Demetriou.
1849c34d33Scgd  * 4. The name of the author may not be used to endorse or promote products
1949c34d33Scgd  *    derived from this software without specific prior written permission
2049c34d33Scgd  *
2149c34d33Scgd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2249c34d33Scgd  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2349c34d33Scgd  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2449c34d33Scgd  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2549c34d33Scgd  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2649c34d33Scgd  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2749c34d33Scgd  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2849c34d33Scgd  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2949c34d33Scgd  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3049c34d33Scgd  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3149c34d33Scgd  */
3249c34d33Scgd 
3349c34d33Scgd #ifndef _MACHINE_DISKLABEL_H_
3449c34d33Scgd #define _MACHINE_DISKLABEL_H_
3549c34d33Scgd 
36*a47e2eb7Sbouyer #define LABELUSESMBR	0			/* no MBR partitionning */
3749c34d33Scgd #define	LABELSECTOR	0			/* sector containing label */
386fb817f5Sbouyer #define	LABELOFFSET	128			/* offset of label in sector */
3949c34d33Scgd #define	MAXPARTITIONS	8			/* number of partitions */
4049c34d33Scgd #define	RAW_PART	2			/* raw partition: xx?c */
4149c34d33Scgd 
4270065d9dSgwr /*
4370065d9dSgwr  * This holds a copy of the whole label block, saved in here by
4470065d9dSgwr  * readdisklabel() so that writedisklabel() can preserve the
4570065d9dSgwr  * parts of the label block outside of the actual label.
4670065d9dSgwr  * (i.e. Sun label info, bad block table, etc.)
4770065d9dSgwr  */
4849c34d33Scgd struct cpu_disklabel {
497554244eSgwr 	char	cd_block[512];
5049c34d33Scgd };
5149c34d33Scgd 
52c03be2adSgwr #ifdef _KERNEL
53c03be2adSgwr 
54c03be2adSgwr struct dkbad;
5510b1a7beSchs int isbad(struct dkbad *, int, int, int);
56c03be2adSgwr 
57c03be2adSgwr #endif	/* _KERNEL */
5849c34d33Scgd #endif /* _MACHINE_DISKLABEL_H_ */
59