1ba0cc1abSMatthew Dillon /* 2ba0cc1abSMatthew Dillon * Copyright (c) 1987, 1988, 1993 3ba0cc1abSMatthew Dillon * The Regents of the University of California. All rights reserved. 4ba0cc1abSMatthew Dillon * 5ba0cc1abSMatthew Dillon * Redistribution and use in source and binary forms, with or without 6ba0cc1abSMatthew Dillon * modification, are permitted provided that the following conditions 7ba0cc1abSMatthew Dillon * are met: 8ba0cc1abSMatthew Dillon * 1. Redistributions of source code must retain the above copyright 9ba0cc1abSMatthew Dillon * notice, this list of conditions and the following disclaimer. 10ba0cc1abSMatthew Dillon * 2. Redistributions in binary form must reproduce the above copyright 11ba0cc1abSMatthew Dillon * notice, this list of conditions and the following disclaimer in the 12ba0cc1abSMatthew Dillon * documentation and/or other materials provided with the distribution. 132c64e990Szrj * 3. Neither the name of the University nor the names of its contributors 14ba0cc1abSMatthew Dillon * may be used to endorse or promote products derived from this software 15ba0cc1abSMatthew Dillon * without specific prior written permission. 16ba0cc1abSMatthew Dillon * 17ba0cc1abSMatthew Dillon * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18ba0cc1abSMatthew Dillon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19ba0cc1abSMatthew Dillon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20ba0cc1abSMatthew Dillon * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21ba0cc1abSMatthew Dillon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22ba0cc1abSMatthew Dillon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23ba0cc1abSMatthew Dillon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24ba0cc1abSMatthew Dillon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25ba0cc1abSMatthew Dillon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26ba0cc1abSMatthew Dillon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27ba0cc1abSMatthew Dillon * SUCH DAMAGE. 28ba0cc1abSMatthew Dillon * 29ba0cc1abSMatthew Dillon * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 30ba0cc1abSMatthew Dillon * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ 31ba0cc1abSMatthew Dillon */ 32ba0cc1abSMatthew Dillon 33ba0cc1abSMatthew Dillon #ifndef _SYS_DTYPE_H_ 34ba0cc1abSMatthew Dillon #define _SYS_DTYPE_H_ 35ba0cc1abSMatthew Dillon 36ba0cc1abSMatthew Dillon #ifndef _SYS_TYPES_H_ 37ba0cc1abSMatthew Dillon #include <sys/types.h> 38ba0cc1abSMatthew Dillon #endif 39ba0cc1abSMatthew Dillon 40ba0cc1abSMatthew Dillon /* d_type values: */ 41ba0cc1abSMatthew Dillon #define DTYPE_SMD 1 /* SMD, XSMD; VAX hp/up */ 42ba0cc1abSMatthew Dillon #define DTYPE_MSCP 2 /* MSCP */ 43ba0cc1abSMatthew Dillon #define DTYPE_DEC 3 /* other DEC (rk, rl) */ 44ba0cc1abSMatthew Dillon #define DTYPE_SCSI 4 /* SCSI */ 45ba0cc1abSMatthew Dillon #define DTYPE_ESDI 5 /* ESDI interface */ 46ba0cc1abSMatthew Dillon #define DTYPE_ST506 6 /* ST506 etc. */ 47ba0cc1abSMatthew Dillon #define DTYPE_HPIB 7 /* CS/80 on HP-IB */ 48ba0cc1abSMatthew Dillon #define DTYPE_HPFL 8 /* HP Fiber-link */ 49ba0cc1abSMatthew Dillon #define DTYPE_FLOPPY 10 /* floppy */ 50ba0cc1abSMatthew Dillon #define DTYPE_CCD 11 /* concatenated disk */ 51ba0cc1abSMatthew Dillon #define DTYPE_VINUM 12 /* vinum volume */ 52ba0cc1abSMatthew Dillon #define DTYPE_DOC2K 13 /* Msys DiskOnChip */ 53ba0cc1abSMatthew Dillon 54ba0cc1abSMatthew Dillon #ifdef DKTYPENAMES 55ba0cc1abSMatthew Dillon static const char *dktypenames[] = { 56ba0cc1abSMatthew Dillon "unknown", 57ba0cc1abSMatthew Dillon "SMD", 58ba0cc1abSMatthew Dillon "MSCP", 59ba0cc1abSMatthew Dillon "old DEC", 60ba0cc1abSMatthew Dillon "SCSI", 61ba0cc1abSMatthew Dillon "ESDI", 62ba0cc1abSMatthew Dillon "ST506", 63ba0cc1abSMatthew Dillon "HP-IB", 64ba0cc1abSMatthew Dillon "HP-FL", 65ba0cc1abSMatthew Dillon "type 9", 66ba0cc1abSMatthew Dillon "floppy", 67ba0cc1abSMatthew Dillon "CCD", 68ba0cc1abSMatthew Dillon "Vinum", 69ba0cc1abSMatthew Dillon "DOC2K", 70ba0cc1abSMatthew Dillon NULL 71ba0cc1abSMatthew Dillon }; 72c157ff7aSSascha Wildner #define DKMAXTYPES (NELEM(dktypenames) - 1) 73ba0cc1abSMatthew Dillon #endif 74ba0cc1abSMatthew Dillon 75ba0cc1abSMatthew Dillon /* 76ba0cc1abSMatthew Dillon * Filesystem type and version. 77ba0cc1abSMatthew Dillon * Used to interpret other filesystem-specific 78ba0cc1abSMatthew Dillon * per-partition information. 79ba0cc1abSMatthew Dillon */ 80ba0cc1abSMatthew Dillon #define FS_UNUSED 0 /* unused */ 81ba0cc1abSMatthew Dillon #define FS_SWAP 1 /* swap */ 82ba0cc1abSMatthew Dillon #define FS_V6 2 /* Sixth Edition */ 83ba0cc1abSMatthew Dillon #define FS_V7 3 /* Seventh Edition */ 84ba0cc1abSMatthew Dillon #define FS_SYSV 4 /* System V */ 85ba0cc1abSMatthew Dillon #define FS_V71K 5 /* V7 with 1K blocks (4.1, 2.9) */ 86ba0cc1abSMatthew Dillon #define FS_V8 6 /* Eighth Edition, 4K blocks */ 87ba0cc1abSMatthew Dillon #define FS_BSDFFS 7 /* 4.2BSD fast file system */ 88ba0cc1abSMatthew Dillon #define FS_MSDOS 8 /* MSDOS file system */ 89ba0cc1abSMatthew Dillon #define FS_BSDLFS 9 /* 4.4BSD log-structured file system */ 90ba0cc1abSMatthew Dillon #define FS_OTHER 10 /* in use, but unknown/unsupported */ 91ba0cc1abSMatthew Dillon #define FS_HPFS 11 /* OS/2 high-performance file system */ 92ba0cc1abSMatthew Dillon #define FS_ISO9660 12 /* ISO 9660, normally CD-ROM */ 93ba0cc1abSMatthew Dillon #define FS_BOOT 13 /* partition contains bootstrap */ 94ba0cc1abSMatthew Dillon #define FS_VINUM 14 /* Vinum drive partition */ 95ba0cc1abSMatthew Dillon #define FS_RAID 15 96ba0cc1abSMatthew Dillon #define FS_RESERVED16 16 97ba0cc1abSMatthew Dillon #define FS_RESERVED17 17 98ba0cc1abSMatthew Dillon #define FS_RESERVED18 18 99ba0cc1abSMatthew Dillon #define FS_CCD 19 /* CCD drive partition */ 10053b7d1e7SMatthew Dillon #define FS_RESERVED20 20 /* (CCD under FreeBSD) */ 101ba0cc1abSMatthew Dillon #define FS_JFS2 21 10253b7d1e7SMatthew Dillon #define FS_HAMMER 22 1039ecd3762SMatthew Dillon #define FS_HAMMER2 23 10453b7d1e7SMatthew Dillon #define FS_UDF 24 105*90d3f402SMatthew Dillon #define FS_RESERVED25 25 10653b7d1e7SMatthew Dillon #define FS_EFS 26 10753b7d1e7SMatthew Dillon #define FS_ZFS 27 108*90d3f402SMatthew Dillon #define FS_RESERVED28 28 109*90d3f402SMatthew Dillon #define FS_RESERVED29 29 110*90d3f402SMatthew Dillon #define FS_NANDFS 30 111*90d3f402SMatthew Dillon #define FS_ENCRYPTED 31 /* generic encrypted */ 112*90d3f402SMatthew Dillon #define FS_UNSPECIFIED 32 /* generic unspecified */ 113ba0cc1abSMatthew Dillon 114ba0cc1abSMatthew Dillon #ifdef DKTYPENAMES 1159ecd3762SMatthew Dillon 116ba0cc1abSMatthew Dillon static const char *fstypenames[] = { 1179ecd3762SMatthew Dillon "unused", /* 0 */ 1189ecd3762SMatthew Dillon "swap", /* 1 */ 1199ecd3762SMatthew Dillon "Version 6", /* 2 */ 1209ecd3762SMatthew Dillon "Version 7", /* 3 */ 1219ecd3762SMatthew Dillon "System V", /* 4 */ 1229ecd3762SMatthew Dillon "4.1BSD", /* 5 */ 1239ecd3762SMatthew Dillon "Eighth Edition", /* 6 */ 1249ecd3762SMatthew Dillon "4.2BSD", /* 7 */ 1259ecd3762SMatthew Dillon "MSDOS", /* 8 */ 1269ecd3762SMatthew Dillon "4.4LFS", /* 9 */ 1279ecd3762SMatthew Dillon "unknown", /* 10 */ 1289ecd3762SMatthew Dillon "HPFS", /* 11 */ 1299ecd3762SMatthew Dillon "ISO9660", /* 12 */ 1309ecd3762SMatthew Dillon "boot", /* 13 */ 1319ecd3762SMatthew Dillon "vinum", /* 14 */ 1329ecd3762SMatthew Dillon "raid", /* 15 */ 1339ecd3762SMatthew Dillon "?", /* 16 */ 1349ecd3762SMatthew Dillon "?", /* 17 */ 1359ecd3762SMatthew Dillon "?", /* 18 */ 1369ecd3762SMatthew Dillon "ccd", /* 19 */ 1379ecd3762SMatthew Dillon "?", /* 20 (do not reuse, bug in freebsd) */ 1389ecd3762SMatthew Dillon "jfs", /* 21 */ 1399ecd3762SMatthew Dillon "HAMMER", /* 22 */ 1409ecd3762SMatthew Dillon "HAMMER2", /* 23 */ 1419ecd3762SMatthew Dillon "UDF", /* 24 */ 1429ecd3762SMatthew Dillon "?", /* 25 */ 1439ecd3762SMatthew Dillon "EFS", /* 26 */ 1449ecd3762SMatthew Dillon "ZFS", /* 27 */ 145*90d3f402SMatthew Dillon "?", /* 28 */ 146*90d3f402SMatthew Dillon "?", /* 29 */ 147*90d3f402SMatthew Dillon "nandfs", /* 30 */ 148*90d3f402SMatthew Dillon "encrypted", /* 31 - encrypted (generic) */ 149*90d3f402SMatthew Dillon "unspecified", /* 32 - unspecified */ 150ba0cc1abSMatthew Dillon NULL 151ba0cc1abSMatthew Dillon }; 1529ecd3762SMatthew Dillon 1539ecd3762SMatthew Dillon static const char *fstype_to_vfsname[] = { 1549ecd3762SMatthew Dillon NULL, /* 0 */ 1559ecd3762SMatthew Dillon NULL, /* 1 */ 1569ecd3762SMatthew Dillon NULL, /* 2 */ 1579ecd3762SMatthew Dillon NULL, /* 3 */ 1589ecd3762SMatthew Dillon NULL, /* 4 */ 1599ecd3762SMatthew Dillon NULL, /* 5 */ 1609ecd3762SMatthew Dillon NULL, /* 6 */ 1619ecd3762SMatthew Dillon "ufs", /* 7 */ 1629ecd3762SMatthew Dillon "msdos", /* 8 */ 1639ecd3762SMatthew Dillon NULL, /* 9 */ 1649ecd3762SMatthew Dillon NULL, /* 10 */ 1659ecd3762SMatthew Dillon "hpfs", /* 11 */ 1669ecd3762SMatthew Dillon "cd9660", /* 12 */ 1679ecd3762SMatthew Dillon NULL, /* 13 */ 1689ecd3762SMatthew Dillon NULL, /* 14 */ 1699ecd3762SMatthew Dillon NULL, /* 15 */ 1709ecd3762SMatthew Dillon NULL, /* 16 */ 1719ecd3762SMatthew Dillon NULL, /* 17 */ 1729ecd3762SMatthew Dillon NULL, /* 18 */ 1739ecd3762SMatthew Dillon NULL, /* 19 */ 1749ecd3762SMatthew Dillon NULL, /* 20 */ 1759ecd3762SMatthew Dillon NULL, /* 21 */ 1769ecd3762SMatthew Dillon "hammer", /* 22 */ 1779ecd3762SMatthew Dillon "hammer2", /* 23 */ 1789ecd3762SMatthew Dillon "udf", /* 24 */ 1799ecd3762SMatthew Dillon NULL, /* 25 */ 180*90d3f402SMatthew Dillon "efs", /* 26 */ 181*90d3f402SMatthew Dillon "zfs", /* 27 */ 182*90d3f402SMatthew Dillon NULL, /* 28 */ 183*90d3f402SMatthew Dillon NULL, /* 29 */ 184*90d3f402SMatthew Dillon "nandfs", /* 30 */ 185*90d3f402SMatthew Dillon "encrypted", /* 31 */ 186*90d3f402SMatthew Dillon "unspec", /* 32 */ 1879ecd3762SMatthew Dillon NULL 1889ecd3762SMatthew Dillon }; 1899ecd3762SMatthew Dillon 190c157ff7aSSascha Wildner #define FSMAXTYPES (NELEM(fstypenames) - 1) 1919ecd3762SMatthew Dillon 192ba0cc1abSMatthew Dillon #endif 193ba0cc1abSMatthew Dillon 194ba0cc1abSMatthew Dillon #endif /* SYS_DTYPE_H_ */ 195