Handle ext4 and logfs in statvfs functions.
[glibc.git] / sysdeps / unix / sysv / linux / linux_fsinfo.h
blobb10e98b46f3860416b8e87b0c7ce163d355ae43d
1 /* Constants from kernel header for various FSes.
2 Copyright (C) 1998-2003,2005,2010 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _LINUX_FSINFO_H
21 #define _LINUX_FSINFO_H 1
23 /* These definitions come from the kernel headers. But we cannot
24 include the headers here because of type clashes. If new
25 filesystem types will become available we have to add the
26 appropriate definitions here.*/
28 /* Constant that identifies the `adfs' filesystem. */
29 #define ADFS_SUPER_MAGIC 0xadf5
31 /* Constant that identifies the `affs' filesystem. */
32 #define AFFS_SUPER_MAGIC 0xadff
34 /* Constant that identifies the `autofs' filesystem. */
35 #define AUTOFS_SUPER_MAGIC 0x187
37 /* Constant that identifies the `bfs' filesystem. */
38 #define BFS_MAGIC 0x1BADFACE
40 /* Constant that identifies the `coda' filesystem. */
41 #define CODA_SUPER_MAGIC 0x73757245
43 /* Constant that identifies the `coherent' filesystem. */
44 #define COH_SUPER_MAGIC 0x012ff7b7
46 /* Constant that identifies the `ramfs' filesystem. */
47 #define CRAMFS_MAGIC 0x28cd3d45
49 /* Constant that identifies the `devfs' filesystem. */
50 #define DEVFS_SUPER_MAGIC 0x1373
52 /* Constant that identifies the `devpts' filesystem. */
53 #define DEVPTS_SUPER_MAGIC 0x1cd1
55 /* Constants that identifies the `efs' filesystem. */
56 #define EFS_SUPER_MAGIC 0x414A53
57 #define EFS_MAGIC 0x072959
59 /* Constant that identifies the `ext2' and `ext3' filesystems. */
60 #define EXT2_SUPER_MAGIC 0xef53
62 /* Constant that identifies the `hpfs' filesystem. */
63 #define HPFS_SUPER_MAGIC 0xf995e849
65 /* Constant that identifies the `iso9660' filesystem. */
66 #define ISOFS_SUPER_MAGIC 0x9660
68 /* Constant that identifies the `jffs' filesystem. */
69 #define JFFS_SUPER_MAGIC 0x07c0
71 /* Constant that identifies the `jffs2' filesystem. */
72 #define JFFS2_SUPER_MAGIC 0x72b6
74 /* Constant that identifies the `jfs' filesystem. */
75 #define JFS_SUPER_MAGIC 0x3153464a
77 /* Constant that identifies the `logfs´ filesystem. */
78 #define LOGFS_MAGIC_U32 0xc97e8168u
80 /* Constants that identify the `minix2' filesystem. */
81 #define MINIX2_SUPER_MAGIC 0x2468
82 #define MINIX2_SUPER_MAGIC2 0x2478
84 /* Constants that identify the `minix' filesystem. */
85 #define MINIX_SUPER_MAGIC 0x137f
86 #define MINIX_SUPER_MAGIC2 0x138F
88 /* Constant that identifies the `msdos' filesystem. */
89 #define MSDOS_SUPER_MAGIC 0x4d44
91 /* Constant that identifies the `ncp' filesystem. */
92 #define NCP_SUPER_MAGIC 0x564c
94 /* Constant that identifies the `nfs' filesystem. */
95 #define NFS_SUPER_MAGIC 0x6969
97 /* Constant that identifies the `ntfs' filesystem. */
98 #define NTFS_SUPER_MAGIC 0x5346544e
100 /* Constant that identifies the `proc' filesystem. */
101 #define PROC_SUPER_MAGIC 0x9fa0
103 /* Constant that identifies the `usbdevfs' filesystem. */
104 #define USBDEVFS_SUPER_MAGIC 0x9fa2
106 /* Constant that identifies the `qnx4' filesystem. */
107 #define QNX4_SUPER_MAGIC 0x002f
109 /* Constant that identifies the `reiser' filesystem. */
110 #define REISERFS_SUPER_MAGIC 0x52654973
112 /* Constant that identifies the `romfs' filesystem. */
113 #define ROMFS_SUPER_MAGIC 0x7275
115 /* Constant that identifies the `shm' filesystem. */
116 #define SHMFS_SUPER_MAGIC 0x01021994
118 /* Constant that identifies the `smb' filesystem. */
119 #define SMB_SUPER_MAGIC 0x517b
121 /* Constant that identifies the `sysfs´ filesystem. */
122 #define SYSFS_MAGIC 0x62656572
124 /* Constants that identify the `sysV' filesystem. */
125 #define SYSV2_SUPER_MAGIC 0x012ff7b6
126 #define SYSV4_SUPER_MAGIC 0x012ff7b5
128 /* Constant that identifies the `udf' filesystem. */
129 #define UDF_SUPER_MAGIC 0x15013346
131 /* Constant that identify the `ufs' filesystem. */
132 #define UFS_MAGIC 0x00011954
133 #define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
135 /* Constant that identifies the `vxfs' filesystem. */
136 #define VXFS_SUPER_MAGIC 0xa501fcf5
138 /* Constant that identifies the `xenix' filesystem. */
139 #define XENIX_SUPER_MAGIC 0x012ff7b4
141 /* Constant that identifies the `xfs' filesystem. */
142 #define XFS_SUPER_MAGIC 0x58465342
144 /* Maximum link counts. */
145 #define COH_LINK_MAX 10000
146 #define EXT2_LINK_MAX 32000
147 #define MINIX2_LINK_MAX 65530
148 #define MINIX_LINK_MAX 250
149 #define REISERFS_LINK_MAX 64535
150 #define SYSV_LINK_MAX 126 /* 127? 251? */
151 #define UFS_LINK_MAX EXT2_LINK_MAX
152 #define XENIX_LINK_MAX 126 /* ?? */
153 #define XFS_LINK_MAX 2147483647
155 /* The Linux kernel header mentioned this as a kind of generic value. */
156 #define LINUX_LINK_MAX 127
159 #endif /* linux_fsinfo.h */