1 /* Constants from kernel header for various FSes.
2    Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4 
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9 
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14 
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, see
17    <http://www.gnu.org/licenses/>.  */
18 
19 #ifndef _LINUX_FSINFO_H
20 #define _LINUX_FSINFO_H	1
21 
22 /* These definitions come from the kernel headers.  But we cannot
23    include the headers here because of type clashes.  If new
24    filesystem types will become available we have to add the
25    appropriate definitions here.*/
26 
27 /* Constants that identify the `adfs' filesystem.  */
28 #define ADFS_SUPER_MAGIC	0xadf5
29 
30 /* Constants that identify the `affs' filesystem.  */
31 #define AFFS_SUPER_MAGIC	0xadff
32 
33 /* Constants that identify the `autofs' filesystem.  */
34 #define AUTOFS_SUPER_MAGIC	0x187
35 
36 /* Constants that identify the `bfs' filesystem.  */
37 #define BFS_MAGIC		0x1BADFACE
38 
39 /* Constants that identify the `coda' filesystem.  */
40 #define CODA_SUPER_MAGIC	0x73757245
41 
42 /* Constants that identify the `coherent' filesystem.  */
43 #define COH_SUPER_MAGIC		0x012ff7b7
44 
45 /* Constant that identifies the `ramfs' filesystem.  */
46 #define CRAMFS_MAGIC		0x28cd3d45
47 
48 /* Constant that identifies the `devfs' filesystem.  */
49 #define DEVFS_SUPER_MAGIC	0x1373
50 
51 /* Constant that identifies the `devpts' filesystem.  */
52 #define DEVPTS_SUPER_MAGIC	0x1cd1
53 
54 /* Constant that identifies the `efs' filesystem.  */
55 #define EFS_SUPER_MAGIC		0x414A53
56 #define EFS_MAGIC		0x072959
57 
58 /* Constant that identifies the `ext2' and `ext3' filesystems.  */
59 #define EXT2_SUPER_MAGIC	0xef53
60 
61 /* Constant that identifies the `hpfs' filesystem.  */
62 #define HPFS_SUPER_MAGIC	0xf995e849
63 
64 /* Constant that identifies the `iso9660' filesystem.  */
65 #define ISOFS_SUPER_MAGIC	0x9660
66 
67 /* Constant that identifies the `jffs' filesystem.  */
68 #define JFFS_SUPER_MAGIC	0x07c0
69 
70 /* Constant that identifies the `jffs2' filesystem.  */
71 #define JFFS2_SUPER_MAGIC	0x72b6
72 
73 /* Constant that identifies the `jfs' filesystem.  */
74 #define JFS_SUPER_MAGIC		0x3153464a
75 
76 /* Constants that identify the `minix2' filesystem.  */
77 #define MINIX2_SUPER_MAGIC	0x2468
78 #define MINIX2_SUPER_MAGIC2	0x2478
79 
80 /* Constants that identify the `minix' filesystem.  */
81 #define MINIX_SUPER_MAGIC	0x137f
82 #define MINIX_SUPER_MAGIC2	0x138F
83 
84 /* Constants that identify the `msdos' filesystem.  */
85 #define MSDOS_SUPER_MAGIC	0x4d44
86 
87 /* Constants that identify the `ncp' filesystem.  */
88 #define NCP_SUPER_MAGIC		0x564c
89 
90 /* Constants that identify the `nfs' filesystem.  */
91 #define NFS_SUPER_MAGIC		0x6969
92 
93 /* Constants that identify the `ntfs' filesystem.  */
94 #define NTFS_SUPER_MAGIC	0x5346544e
95 
96 /* Constants that identify the `proc' filesystem.  */
97 #define PROC_SUPER_MAGIC	0x9fa0
98 
99 /* Constant that identifies the `usbdevfs' filesystem.  */
100 #define USBDEVFS_SUPER_MAGIC	0x9fa2
101 
102 /* Constants that identify the `qnx4' filesystem.  */
103 #define QNX4_SUPER_MAGIC	0x002f
104 
105 /* Constants that identify the `reiser' filesystem.  */
106 #define REISERFS_SUPER_MAGIC	0x52654973
107 
108 /* Constant that identifies the `romfs' filesystem.  */
109 #define ROMFS_SUPER_MAGIC	0x7275
110 
111 /* Constants that identify the `smb' filesystem.  */
112 #define SMB_SUPER_MAGIC		0x517b
113 
114 /* Constants that identify the `sysV' filesystem.  */
115 #define SYSV2_SUPER_MAGIC	0x012ff7b6
116 #define SYSV4_SUPER_MAGIC	0x012ff7b5
117 
118 /* Constants that identify the `udf' filesystem.  */
119 #define UDF_SUPER_MAGIC		0x15013346
120 
121 /* Constants that identify the `ufs' filesystem.  */
122 #define UFS_MAGIC		0x00011954
123 #define UFS_CIGAM		0x54190100 /* byteswapped MAGIC */
124 
125 /* Constants that identify the `xenix' filesystem.  */
126 #define XENIX_SUPER_MAGIC	0x012ff7b4
127 
128 /* Constant that identifies the `shm' filesystem.  */
129 #define SHMFS_SUPER_MAGIC	0x01021994
130 
131 /* Constants that identify the `xfs' filesystem.  */
132 #define XFS_SUPER_MAGIC		0x58465342
133 
134 /* Constants that identify the `vxfs' filesystem.  */
135 #define VXFS_SUPER_MAGIC	0xa501fcf5
136 
137 /* Maximum link counts.  */
138 #define COH_LINK_MAX		10000
139 #define EXT2_LINK_MAX		32000
140 #define MINIX2_LINK_MAX		65530
141 #define MINIX_LINK_MAX		250
142 #define REISERFS_LINK_MAX	64535
143 #define SYSV_LINK_MAX		126     /* 127? 251? */
144 #define UFS_LINK_MAX		EXT2_LINK_MAX
145 #define XENIX_LINK_MAX		126     /* ?? */
146 #define XFS_LINK_MAX		2147483647
147 
148 /* The Linux kernel header mentioned this as a kind of generic value.  */
149 #define LINUX_LINK_MAX	127
150 
151 
152 #endif	/* linux_fsinfo.h */
153