xref: /dragonfly/sys/sys/dtype.h (revision e6d22e9b)
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. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  *	@(#)disklabel.h	8.2 (Berkeley) 7/10/94
30  * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $
31  */
32 
33 #ifndef _SYS_DTYPE_H_
34 #define	_SYS_DTYPE_H_
35 
36 #ifndef _SYS_TYPES_H_
37 #include <sys/types.h>
38 #endif
39 
40 /* d_type values: */
41 #define	DTYPE_SMD		1		/* SMD, XSMD; VAX hp/up */
42 #define	DTYPE_MSCP		2		/* MSCP */
43 #define	DTYPE_DEC		3		/* other DEC (rk, rl) */
44 #define	DTYPE_SCSI		4		/* SCSI */
45 #define	DTYPE_ESDI		5		/* ESDI interface */
46 #define	DTYPE_ST506		6		/* ST506 etc. */
47 #define	DTYPE_HPIB		7		/* CS/80 on HP-IB */
48 #define	DTYPE_HPFL		8		/* HP Fiber-link */
49 #define	DTYPE_FLOPPY		10		/* floppy */
50 #define	DTYPE_CCD		11		/* concatenated disk */
51 #define	DTYPE_VINUM		12		/* vinum volume */
52 #define	DTYPE_DOC2K		13		/* Msys DiskOnChip */
53 
54 #ifdef DKTYPENAMES
55 static const char *dktypenames[] = {
56 	"unknown",
57 	"SMD",
58 	"MSCP",
59 	"old DEC",
60 	"SCSI",
61 	"ESDI",
62 	"ST506",
63 	"HP-IB",
64 	"HP-FL",
65 	"type 9",
66 	"floppy",
67 	"CCD",
68 	"Vinum",
69 	"DOC2K",
70 	NULL
71 };
72 #define DKMAXTYPES	(NELEM(dktypenames) - 1)
73 #endif
74 
75 /*
76  * Filesystem type and version.
77  * Used to interpret other filesystem-specific
78  * per-partition information.
79  */
80 #define	FS_UNUSED	0		/* unused */
81 #define	FS_SWAP		1		/* swap */
82 #define	FS_V6		2		/* Sixth Edition */
83 #define	FS_V7		3		/* Seventh Edition */
84 #define	FS_SYSV		4		/* System V */
85 #define	FS_V71K		5		/* V7 with 1K blocks (4.1, 2.9) */
86 #define	FS_V8		6		/* Eighth Edition, 4K blocks */
87 #define	FS_BSDFFS	7		/* 4.2BSD fast file system */
88 #define	FS_MSDOS	8		/* MSDOS file system */
89 #define	FS_BSDLFS	9		/* 4.4BSD log-structured file system */
90 #define	FS_OTHER	10		/* in use, but unknown/unsupported */
91 #define	FS_HPFS		11		/* OS/2 high-performance file system */
92 #define	FS_ISO9660	12		/* ISO 9660, normally CD-ROM */
93 #define	FS_BOOT		13		/* partition contains bootstrap */
94 #define	FS_VINUM	14		/* Vinum drive partition */
95 #define	FS_RAID		15
96 #define FS_RESERVED16	16
97 #define FS_RESERVED17	17
98 #define FS_RESERVED18	18
99 #define FS_CCD		19		/* CCD drive partition */
100 #define FS_RESERVED20	20		/* (CCD under FreeBSD) */
101 #define FS_JFS2		21
102 #define FS_HAMMER	22
103 #define FS_HAMMER2	23
104 #define FS_UDF		24
105 #define FS_RESERVED25	25
106 #define FS_EFS		26
107 #define FS_ZFS		27
108 #define FS_RESERVED28	28
109 #define FS_RESERVED29	29
110 #define FS_NANDFS	30
111 #define FS_ENCRYPTED	31		/* generic encrypted */
112 #define FS_UNSPECIFIED	32		/* generic unspecified */
113 
114 #ifdef	DKTYPENAMES
115 
116 static const char *fstypenames[] = {
117 	"unused",		/* 0	*/
118 	"swap",			/* 1	*/
119 	"Version 6",		/* 2	*/
120 	"Version 7",		/* 3	*/
121 	"System V",		/* 4	*/
122 	"4.1BSD",		/* 5	*/
123 	"Eighth Edition",	/* 6	*/
124 	"4.2BSD",		/* 7	*/
125 	"MSDOS",		/* 8	*/
126 	"4.4LFS",		/* 9	*/
127 	"unknown",		/* 10	*/
128 	"HPFS",			/* 11	*/
129 	"ISO9660",		/* 12	*/
130 	"boot",			/* 13	*/
131 	"vinum",		/* 14	*/
132 	"raid",			/* 15	*/
133 	"?",			/* 16	*/
134 	"?",			/* 17	*/
135 	"?",			/* 18	*/
136 	"ccd",			/* 19	*/
137 	"?",			/* 20	(do not reuse, bug in freebsd) */
138 	"jfs",			/* 21	*/
139 	"HAMMER",		/* 22	*/
140 	"HAMMER2",		/* 23	*/
141 	"UDF",			/* 24	*/
142 	"?",			/* 25	*/
143 	"EFS",			/* 26	*/
144 	"ZFS",			/* 27	*/
145 	"?",			/* 28	*/
146 	"?",			/* 29	*/
147 	"nandfs",		/* 30	*/
148 	"encrypted",		/* 31 - encrypted (generic) */
149 	"unspecified",		/* 32 - unspecified */
150 	NULL
151 };
152 
153 static const char *fstype_to_vfsname[] = {
154 	NULL,			/* 0	*/
155 	NULL,			/* 1	*/
156 	NULL,			/* 2	*/
157 	NULL,			/* 3	*/
158 	NULL,			/* 4	*/
159 	NULL,			/* 5	*/
160 	NULL,			/* 6	*/
161 	"ufs",			/* 7	*/
162 	"msdos",		/* 8	*/
163 	NULL,			/* 9	*/
164 	NULL,			/* 10	*/
165 	"hpfs",			/* 11	*/
166 	"cd9660",		/* 12	*/
167 	NULL,			/* 13	*/
168 	NULL,			/* 14	*/
169 	NULL,			/* 15	*/
170 	NULL,			/* 16	*/
171 	NULL,			/* 17	*/
172 	NULL,			/* 18	*/
173 	NULL,			/* 19	*/
174 	NULL,			/* 20	*/
175 	NULL,			/* 21	*/
176 	"hammer",		/* 22	*/
177 	"hammer2",		/* 23	*/
178 	"udf",			/* 24	*/
179 	NULL,			/* 25	*/
180 	"efs",			/* 26	*/
181 	"zfs",			/* 27	*/
182 	NULL,			/* 28	*/
183 	NULL,			/* 29	*/
184 	"nandfs",		/* 30	*/
185 	"encrypted",		/* 31	*/
186 	"unspec",		/* 32	*/
187 	NULL
188 };
189 
190 #define FSMAXTYPES	(NELEM(fstypenames) - 1)
191 
192 #endif
193 
194 #endif /* SYS_DTYPE_H_ */
195