xref: /dragonfly/sys/sys/dtype.h (revision 8a7bdfea)
1 /*
2  * Copyright (c) 1987, 1988, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *	This product includes software developed by the University of
16  *	California, Berkeley and its contributors.
17  * 4. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  *	@(#)disklabel.h	8.2 (Berkeley) 7/10/94
34  * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $
35  * $DragonFly: src/sys/sys/dtype.h,v 1.2 2008/03/22 20:52:00 dillon Exp $
36  */
37 
38 #ifndef _SYS_DTYPE_H_
39 #define	_SYS_DTYPE_H_
40 
41 #ifndef _SYS_TYPES_H_
42 #include <sys/types.h>
43 #endif
44 
45 /* d_type values: */
46 #define	DTYPE_SMD		1		/* SMD, XSMD; VAX hp/up */
47 #define	DTYPE_MSCP		2		/* MSCP */
48 #define	DTYPE_DEC		3		/* other DEC (rk, rl) */
49 #define	DTYPE_SCSI		4		/* SCSI */
50 #define	DTYPE_ESDI		5		/* ESDI interface */
51 #define	DTYPE_ST506		6		/* ST506 etc. */
52 #define	DTYPE_HPIB		7		/* CS/80 on HP-IB */
53 #define	DTYPE_HPFL		8		/* HP Fiber-link */
54 #define	DTYPE_FLOPPY		10		/* floppy */
55 #define	DTYPE_CCD		11		/* concatenated disk */
56 #define	DTYPE_VINUM		12		/* vinum volume */
57 #define	DTYPE_DOC2K		13		/* Msys DiskOnChip */
58 
59 #ifdef DKTYPENAMES
60 static const char *dktypenames[] = {
61 	"unknown",
62 	"SMD",
63 	"MSCP",
64 	"old DEC",
65 	"SCSI",
66 	"ESDI",
67 	"ST506",
68 	"HP-IB",
69 	"HP-FL",
70 	"type 9",
71 	"floppy",
72 	"CCD",
73 	"Vinum",
74 	"DOC2K",
75 	NULL
76 };
77 #define DKMAXTYPES	(sizeof(dktypenames) / sizeof(dktypenames[0]) - 1)
78 #endif
79 
80 /*
81  * Filesystem type and version.
82  * Used to interpret other filesystem-specific
83  * per-partition information.
84  */
85 #define	FS_UNUSED	0		/* unused */
86 #define	FS_SWAP		1		/* swap */
87 #define	FS_V6		2		/* Sixth Edition */
88 #define	FS_V7		3		/* Seventh Edition */
89 #define	FS_SYSV		4		/* System V */
90 #define	FS_V71K		5		/* V7 with 1K blocks (4.1, 2.9) */
91 #define	FS_V8		6		/* Eighth Edition, 4K blocks */
92 #define	FS_BSDFFS	7		/* 4.2BSD fast file system */
93 #define	FS_MSDOS	8		/* MSDOS file system */
94 #define	FS_BSDLFS	9		/* 4.4BSD log-structured file system */
95 #define	FS_OTHER	10		/* in use, but unknown/unsupported */
96 #define	FS_HPFS		11		/* OS/2 high-performance file system */
97 #define	FS_ISO9660	12		/* ISO 9660, normally CD-ROM */
98 #define	FS_BOOT		13		/* partition contains bootstrap */
99 #define	FS_VINUM	14		/* Vinum drive partition */
100 #define	FS_RAID		15
101 #define FS_RESERVED16	16
102 #define FS_RESERVED17	17
103 #define FS_RESERVED18	18
104 #define FS_CCD		19		/* CCD drive partition */
105 #define FS_RESERVED20	20		/* (CCD under FreeBSD) */
106 #define FS_JFS2		21
107 #define FS_HAMMER	22
108 #define FS_UDF		24
109 #define FS_EFS		26
110 #define FS_ZFS		27
111 
112 #ifdef	DKTYPENAMES
113 static const char *fstypenames[] = {
114 	"unused",
115 	"swap",
116 	"Version 6",
117 	"Version 7",
118 	"System V",
119 	"4.1BSD",
120 	"Eighth Edition",
121 	"4.2BSD",
122 	"MSDOS",
123 	"4.4LFS",
124 	"unknown",
125 	"HPFS",
126 	"ISO9660",
127 	"boot",
128 	"vinum",
129 	"raid",
130 	"?",
131 	"?",
132 	"?",
133 	"ccd",
134 	"?",	/* don't use in case freebsd reassigns jfs / bug in freebsd */
135 	"jfs",
136 	"HAMMER",
137 	"?",
138 	"UDF",
139 	"?",
140 	"EFS",
141 	"ZFS",
142 	NULL
143 };
144 #define FSMAXTYPES	(sizeof(fstypenames) / sizeof(fstypenames[0]) - 1)
145 #endif
146 
147 #endif /* SYS_DTYPE_H_ */
148