Update copyright notices with scripts/update-copyrights
[glibc.git] / sysdeps / unix / sysv / linux / linux_fsinfo.h
blob1547ba86a708c16c81993b4743e2277b341e3768
1 /* Constants from kernel header for various FSes.
2 Copyright (C) 1998-2014 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
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/>. */
19 #ifndef _LINUX_FSINFO_H
20 #define _LINUX_FSINFO_H 1
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. */
27 /* Constant that identifies the `adfs' filesystem. */
28 #define ADFS_SUPER_MAGIC 0xadf5
30 /* Constant that identifies the `affs' filesystem. */
31 #define AFFS_SUPER_MAGIC 0xadff
33 /* Constant that identifies the `autofs' filesystem. */
34 #define AUTOFS_SUPER_MAGIC 0x187
36 /* Constant that identifies the `bfs' filesystem. */
37 #define BFS_MAGIC 0x1badface
39 /* Constant that identifies the `btrfs' filesystem. */
40 #define BTRFS_SUPER_MAGIC 0x9123683e
42 /* Constant that identifies the `cgroup' filesystem. */
43 #define CGROUP_SUPER_MAGIC 0x27e0eb
45 /* Constant that identifies the `coda' filesystem. */
46 #define CODA_SUPER_MAGIC 0x73757245
48 /* Constant that identifies the `coherent' filesystem. */
49 #define COH_SUPER_MAGIC 0x012ff7b7
51 /* Constant that identifies the `ramfs' filesystem. */
52 #define CRAMFS_MAGIC 0x28cd3d45
54 /* Constant that identifies the `devfs' filesystem. */
55 #define DEVFS_SUPER_MAGIC 0x1373
57 /* Constant that identifies the `devpts' filesystem. */
58 #define DEVPTS_SUPER_MAGIC 0x1cd1
60 /* Constants that identifies the `efs' filesystem. */
61 #define EFS_SUPER_MAGIC 0x414a53
62 #define EFS_MAGIC 0x072959
64 /* Constants that identifies the `evivar' filesystem. */
65 #define EFIVARFS_MAGIC 0xde5e81e4
67 /* Constant that identifies the `ext2' and `ext3' filesystems. */
68 #define EXT2_SUPER_MAGIC 0xef53
70 /* Constant that identifies the `f2fs' filesystem. */
71 #define F2FS_SUPER_MAGIC 0xf2f52010
73 /* Constant that identifies the `hpfs' filesystem. */
74 #define HPFS_SUPER_MAGIC 0xf995e849
76 /* Constant that identifies the `iso9660' filesystem. */
77 #define ISOFS_SUPER_MAGIC 0x9660
79 /* Constant that identifies the `jffs' filesystem. */
80 #define JFFS_SUPER_MAGIC 0x07c0
82 /* Constant that identifies the `jffs2' filesystem. */
83 #define JFFS2_SUPER_MAGIC 0x72b6
85 /* Constant that identifies the `jfs' filesystem. */
86 #define JFS_SUPER_MAGIC 0x3153464a
88 /* Constant that identifies the `logfs' filesystem. */
89 #define LOGFS_MAGIC_U32 0xc97e8168u
91 /* Constant that identifies the `lustre' filesystem. */
92 #define LUSTRE_SUPER_MAGIC 0x0BD00BD0
94 /* Constants that identify the `minix2' filesystem. */
95 #define MINIX2_SUPER_MAGIC 0x2468
96 #define MINIX2_SUPER_MAGIC2 0x2478
98 /* Constants that identify the `minix' filesystem. */
99 #define MINIX_SUPER_MAGIC 0x137f
100 #define MINIX_SUPER_MAGIC2 0x138F
102 /* Constant that identifies the `msdos' filesystem. */
103 #define MSDOS_SUPER_MAGIC 0x4d44
105 /* Constant that identifies the `ncp' filesystem. */
106 #define NCP_SUPER_MAGIC 0x564c
108 /* Constant that identifies the `nfs' filesystem. */
109 #define NFS_SUPER_MAGIC 0x6969
111 /* Constant that identifies the `ntfs' filesystem. */
112 #define NTFS_SUPER_MAGIC 0x5346544e
114 /* Constant that identifies the `proc' filesystem. */
115 #define PROC_SUPER_MAGIC 0x9fa0
117 /* Constant that identifies the `usbdevfs' filesystem. */
118 #define USBDEVFS_SUPER_MAGIC 0x9fa2
120 /* Constant that identifies the `qnx4' filesystem. */
121 #define QNX4_SUPER_MAGIC 0x002f
123 /* Constant that identifies the `reiser' filesystem. */
124 #define REISERFS_SUPER_MAGIC 0x52654973
126 /* Constant that identifies the `romfs' filesystem. */
127 #define ROMFS_SUPER_MAGIC 0x7275
129 /* Constant that identifies the `shm' filesystem. */
130 #define SHMFS_SUPER_MAGIC 0x01021994
132 /* Constant that identifies the `smb' filesystem. */
133 #define SMB_SUPER_MAGIC 0x517b
135 /* Constant that identifies the `sysfs' filesystem. */
136 #define SYSFS_MAGIC 0x62656572
138 /* Constants that identify the `sysV' filesystem. */
139 #define SYSV2_SUPER_MAGIC 0x012ff7b6
140 #define SYSV4_SUPER_MAGIC 0x012ff7b5
142 /* Constant that identifies the `udf' filesystem. */
143 #define UDF_SUPER_MAGIC 0x15013346
145 /* Constant that identify the `ufs' filesystem. */
146 #define UFS_MAGIC 0x00011954
147 #define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
149 /* Constant that identifies the `vxfs' filesystem. */
150 #define VXFS_SUPER_MAGIC 0xa501fcf5
152 /* Constant that identifies the `xenix' filesystem. */
153 #define XENIX_SUPER_MAGIC 0x012ff7b4
155 /* Constant that identifies the `xfs' filesystem. */
156 #define XFS_SUPER_MAGIC 0x58465342
158 /* Maximum link counts. */
159 #define COH_LINK_MAX 10000
160 #define EXT2_LINK_MAX 32000
161 #define EXT4_LINK_MAX 65000
162 #define F2FS_LINK_MAX 32000
163 #define LUSTRE_LINK_MAX EXT4_LINK_MAX
164 #define MINIX2_LINK_MAX 65530
165 #define MINIX_LINK_MAX 250
166 #define REISERFS_LINK_MAX 64535
167 #define SYSV_LINK_MAX 126 /* 127? 251? */
168 #define UFS_LINK_MAX EXT2_LINK_MAX
169 #define XENIX_LINK_MAX 126 /* ?? */
170 #define XFS_LINK_MAX 2147483647
172 /* The Linux kernel header mentioned this as a kind of generic value. */
173 #define LINUX_LINK_MAX 127
176 #endif /* linux_fsinfo.h */