]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/linux_fsinfo.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / linux_fsinfo.h
CommitLineData
24f25de6 1/* Constants from kernel header for various FSes.
04277e02 2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
24f25de6
UD
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
41bdb6e2
AJ
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.
24f25de6
UD
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
41bdb6e2 13 Lesser General Public License for more details.
24f25de6 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
24f25de6
UD
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
6484ba5e 25 appropriate definitions here. */
1503837c 26
6e0a06fa 27/* Constant that identifies the `adfs' filesystem. */
24f25de6 28#define ADFS_SUPER_MAGIC 0xadf5
1503837c 29
6e0a06fa 30/* Constant that identifies the `affs' filesystem. */
24f25de6 31#define AFFS_SUPER_MAGIC 0xadff
1503837c 32
8da79b60
MF
33/* Constant that identifies the `afs' filesystem. */
34#define AFS_SUPER_MAGIC 0x5346414F
35
36/* Constant that identifies the `anon_inodefs' filesystem. */
37#define ANON_INODE_FS_MAGIC 0x09041934
38
6e0a06fa 39/* Constant that identifies the `autofs' filesystem. */
d0501a24
UD
40#define AUTOFS_SUPER_MAGIC 0x187
41
8da79b60
MF
42/* Constant that identifies the `bdev' filesystem. */
43#define BDEVFS_MAGIC 0x62646576
44
6e0a06fa 45/* Constant that identifies the `bfs' filesystem. */
b8b4863d 46#define BFS_MAGIC 0x1badface
1503837c 47
8da79b60
MF
48/* Constant that identifies the `binfmt_misc' filesystem. */
49#define BINFMTFS_MAGIC 0x42494e4d
50
6484ba5e 51/* Constant that identifies the `btrfs' filesystem. */
b8b4863d 52#define BTRFS_SUPER_MAGIC 0x9123683e
6484ba5e 53
8da79b60
MF
54/* Constant that identifies the `btrfs_test_fs' filesystem. */
55#define BTRFS_TEST_MAGIC 0x73727279
56
6484ba5e 57/* Constant that identifies the `cgroup' filesystem. */
b8b4863d 58#define CGROUP_SUPER_MAGIC 0x27e0eb
6484ba5e 59
6e0a06fa 60/* Constant that identifies the `coda' filesystem. */
24f25de6 61#define CODA_SUPER_MAGIC 0x73757245
1503837c 62
6e0a06fa 63/* Constant that identifies the `coherent' filesystem. */
1503837c
UD
64#define COH_SUPER_MAGIC 0x012ff7b7
65
8da79b60 66/* Constant that identifies the `cramfs' filesystem. */
564cd8b6
UD
67#define CRAMFS_MAGIC 0x28cd3d45
68
8da79b60
MF
69/* Constant that identifies the `cramfs' filesystem w/opposite endianness. */
70#define CRAMFS_MAGIC_WEND 0x453dcd28
71
72/* Constant that identifies the `debugfs' filesystem. */
73#define DEBUGFS_MAGIC 0x64626720
74
1503837c 75/* Constant that identifies the `devfs' filesystem. */
9c9f3b17 76#define DEVFS_SUPER_MAGIC 0x1373
1503837c
UD
77
78/* Constant that identifies the `devpts' filesystem. */
79#define DEVPTS_SUPER_MAGIC 0x1cd1
80
8da79b60
MF
81/* Constants that identifies the `ecryptfs' filesystem. */
82#define ECRYPTFS_SUPER_MAGIC 0xf15f
83
6e0a06fa 84/* Constants that identifies the `efs' filesystem. */
b8b4863d 85#define EFS_SUPER_MAGIC 0x414a53
564cd8b6 86#define EFS_MAGIC 0x072959
1503837c 87
67525cb8
AJ
88/* Constants that identifies the `evivar' filesystem. */
89#define EFIVARFS_MAGIC 0xde5e81e4
90
8da79b60 91/* Constant that identifies the `ext2' filesystem. */
24f25de6 92#define EXT2_SUPER_MAGIC 0xef53
1503837c 93
8da79b60
MF
94/* Constant that identifies the `ext3' filesystem. */
95#define EXT3_SUPER_MAGIC 0xef53
96
97/* Constant that identifies the `ext3' filesystem. */
98#define EXT4_SUPER_MAGIC 0xef53
99
67525cb8
AJ
100/* Constant that identifies the `f2fs' filesystem. */
101#define F2FS_SUPER_MAGIC 0xf2f52010
102
8da79b60
MF
103/* Constant that identifies the `futexfs' filesystem. */
104#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
105
106/* Constant that identifies the `hostfs' filesystem. */
107#define HOSTFS_SUPER_MAGIC 0x00c0ffee
108
1503837c 109/* Constant that identifies the `hpfs' filesystem. */
24f25de6 110#define HPFS_SUPER_MAGIC 0xf995e849
1503837c 111
8da79b60
MF
112/* Constant that identifies the `hugetlbfs' filesystem. */
113#define HUGETLBFS_MAGIC 0x958458f6
114
1503837c 115/* Constant that identifies the `iso9660' filesystem. */
24f25de6 116#define ISOFS_SUPER_MAGIC 0x9660
1503837c 117
69c708ed
RM
118/* Constant that identifies the `jffs' filesystem. */
119#define JFFS_SUPER_MAGIC 0x07c0
120
121/* Constant that identifies the `jffs2' filesystem. */
122#define JFFS2_SUPER_MAGIC 0x72b6
123
124/* Constant that identifies the `jfs' filesystem. */
125#define JFS_SUPER_MAGIC 0x3153464a
126
b8b4863d 127/* Constant that identifies the `logfs' filesystem. */
6e0a06fa
UD
128#define LOGFS_MAGIC_U32 0xc97e8168u
129
de283087
AD
130/* Constant that identifies the `lustre' filesystem. */
131#define LUSTRE_SUPER_MAGIC 0x0BD00BD0
132
1503837c 133/* Constants that identify the `minix2' filesystem. */
24f25de6
UD
134#define MINIX2_SUPER_MAGIC 0x2468
135#define MINIX2_SUPER_MAGIC2 0x2478
1503837c 136
8da79b60
MF
137/* Constants that identify the `minix3' filesystem. */
138#define MINIX3_SUPER_MAGIC 0x4d5a
139
1503837c
UD
140/* Constants that identify the `minix' filesystem. */
141#define MINIX_SUPER_MAGIC 0x137f
142#define MINIX_SUPER_MAGIC2 0x138F
143
6e0a06fa 144/* Constant that identifies the `msdos' filesystem. */
24f25de6 145#define MSDOS_SUPER_MAGIC 0x4d44
1503837c 146
8da79b60
MF
147/* Constant that identifies the `mtd_inodefs' filesystem. */
148#define MTD_INODE_FS_MAGIC 0x11307854
149
6e0a06fa 150/* Constant that identifies the `ncp' filesystem. */
24f25de6 151#define NCP_SUPER_MAGIC 0x564c
1503837c 152
8da79b60
MF
153/* Constant that identifies the `nilfs' filesystem. */
154#define NILFS_SUPER_MAGIC 0x3434
155
6e0a06fa 156/* Constant that identifies the `nfs' filesystem. */
24f25de6 157#define NFS_SUPER_MAGIC 0x6969
1503837c 158
6e0a06fa 159/* Constant that identifies the `ntfs' filesystem. */
69c708ed
RM
160#define NTFS_SUPER_MAGIC 0x5346544e
161
8da79b60
MF
162/* Constant that identifies the `openpromfs' filesystem. */
163#define OPENPROM_SUPER_MAGIC 0x9fa1
164
165/* Constant that identifies the `pipefs' filesystem. */
166#define PIPEFS_MAGIC 0x50495045
167
6e0a06fa 168/* Constant that identifies the `proc' filesystem. */
24f25de6 169#define PROC_SUPER_MAGIC 0x9fa0
1503837c 170
8da79b60
MF
171/* Constant that identifies the `pstorefs' filesystem. */
172#define PSTOREFS_MAGIC 0x6165676C
d0501a24 173
6e0a06fa 174/* Constant that identifies the `qnx4' filesystem. */
cd33623e 175#define QNX4_SUPER_MAGIC 0x002f
1503837c 176
8da79b60
MF
177/* Constant that identifies the `qnx6' filesystem. */
178#define QNX6_SUPER_MAGIC 0x68191122
179
180/* Constant that identifies the `ramfs' filesystem. */
181#define RAMFS_MAGIC 0x858458f6
182
6e0a06fa 183/* Constant that identifies the `reiser' filesystem. */
cd33623e 184#define REISERFS_SUPER_MAGIC 0x52654973
1503837c 185
8da79b60
MF
186#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
187#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
188#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
189
69c708ed
RM
190/* Constant that identifies the `romfs' filesystem. */
191#define ROMFS_SUPER_MAGIC 0x7275
192
8da79b60
MF
193/* Constant that identifies the `securityfs' filesystem. */
194#define SECURITYFS_MAGIC 0x73636673
195
196/* Constant that identifies the `selinuxfs' filesystem. */
197#define SELINUX_MAGIC 0xf97cff8c
198
199/* Constant that identifies the `smackfs' filesystem. */
200#define SMACK_MAGIC 0x43415d53 /* "SMAC" */
201
6e0a06fa
UD
202/* Constant that identifies the `shm' filesystem. */
203#define SHMFS_SUPER_MAGIC 0x01021994
204
205/* Constant that identifies the `smb' filesystem. */
24f25de6 206#define SMB_SUPER_MAGIC 0x517b
1503837c 207
8da79b60
MF
208/* Constant that identifies the `sockfs' filesystem. */
209#define SOCKFS_MAGIC 0x534F434B
210
211/* Constant that identifies the `squashfs' filesystem. */
212#define SQUASHFS_MAGIC 0x73717368
213
214/* Constant that identifies the end of stacks allocated by the kernel. */
215#define STACK_END_MAGIC 0x57AC6E9D
216
b8b4863d 217/* Constant that identifies the `sysfs' filesystem. */
6e0a06fa
UD
218#define SYSFS_MAGIC 0x62656572
219
1503837c 220/* Constants that identify the `sysV' filesystem. */
24f25de6 221#define SYSV2_SUPER_MAGIC 0x012ff7b6
1503837c
UD
222#define SYSV4_SUPER_MAGIC 0x012ff7b5
223
8da79b60
MF
224/* Constant that identifies the `tmpfs' filesystem. */
225#define TMPFS_MAGIC 0x01021994
226
6e0a06fa 227/* Constant that identifies the `udf' filesystem. */
69c708ed
RM
228#define UDF_SUPER_MAGIC 0x15013346
229
6e0a06fa 230/* Constant that identify the `ufs' filesystem. */
24f25de6
UD
231#define UFS_MAGIC 0x00011954
232#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
233
8da79b60
MF
234/* Constant that identifies the `usbdevfs' filesystem. */
235#define USBDEVFS_SUPER_MAGIC 0x9fa2
236#define USBDEVICE_SUPER_MAGIC 0x9fa2
237
238/* Constant that identifies the `9p' filesystem. */
239#define V9FS_MAGIC 0x01021997
240
6e0a06fa
UD
241/* Constant that identifies the `vxfs' filesystem. */
242#define VXFS_SUPER_MAGIC 0xa501fcf5
1503837c 243
8da79b60
MF
244/* Constant that identifies the `xenfs' filesystem. */
245#define XENFS_SUPER_MAGIC 0xabba1974
246
6e0a06fa
UD
247/* Constant that identifies the `xenix' filesystem. */
248#define XENIX_SUPER_MAGIC 0x012ff7b4
afdda55a 249
6e0a06fa 250/* Constant that identifies the `xfs' filesystem. */
75c151a1
UD
251#define XFS_SUPER_MAGIC 0x58465342
252
24f25de6 253/* Maximum link counts. */
1503837c 254#define COH_LINK_MAX 10000
24f25de6 255#define EXT2_LINK_MAX 32000
de283087 256#define EXT4_LINK_MAX 65000
67525cb8 257#define F2FS_LINK_MAX 32000
de283087 258#define LUSTRE_LINK_MAX EXT4_LINK_MAX
24f25de6 259#define MINIX2_LINK_MAX 65530
1503837c 260#define MINIX_LINK_MAX 250
cd33623e 261#define REISERFS_LINK_MAX 64535
24f25de6 262#define SYSV_LINK_MAX 126 /* 127? 251? */
24f25de6 263#define UFS_LINK_MAX EXT2_LINK_MAX
1503837c 264#define XENIX_LINK_MAX 126 /* ?? */
75c151a1 265#define XFS_LINK_MAX 2147483647
24f25de6 266
0d83b42e
RM
267/* The Linux kernel header mentioned this as a kind of generic value. */
268#define LINUX_LINK_MAX 127
269
270
24f25de6 271#endif /* linux_fsinfo.h */