blob: 7397a4e5da844c5a20466441e0248dc7548d0945 [file] [log] [blame]
bigbiff7b4c7a62015-01-01 19:44:14 -05001#ifndef UTIL_LINUX_STATFS_MAGIC_H
2#define UTIL_LINUX_STATFS_MAGIC_H
3
4#include <sys/statfs.h>
5
6/*
7 * If possible then don't depend on internal libc __SWORD_TYPE type.
8 */
9#ifdef __GNUC__
10#define F_TYPE_EQUAL(a, b) (a == (__typeof__(a)) b)
11#else
12#define F_TYPE_EQUAL(a, b) (a == (__SWORD_TYPE) b)
13#endif
14
15/*
16 * Unfortunately, Linux kernel hedeader file <linux/magic.h> is incomplete
17 * mess and kernel returns by statfs f_type many numbers that are nowhere
18 * specified (in API).
19 *
20 * This is collection of the magic numbers.
21 */
22#define STATFS_ADFS_MAGIC 0xadf5
23#define STATFS_AFFS_MAGIC 0xadff
24#define STATFS_AFS_MAGIC 0x5346414F
25#define STATFS_AUTOFS_MAGIC 0x0187
26#define STATFS_BDEVFS_MAGIC 0x62646576
27#define STATFS_BEFS_MAGIC 0x42465331
28#define STATFS_BFS_MAGIC 0x1BADFACE
29#define STATFS_BINFMTFS_MAGIC 0x42494e4d
30#define STATFS_BTRFS_MAGIC 0x9123683E
31#define STATFS_CEPH_MAGIC 0x00c36400
32#define STATFS_CGROUP_MAGIC 0x27e0eb
33#define STATFS_CIFS_MAGIC 0xff534d42
34#define STATFS_CODA_MAGIC 0x73757245
35#define STATFS_CONFIGFS_MAGIC 0x62656570
36#define STATFS_CRAMFS_MAGIC 0x28cd3d45
37#define STATFS_DEBUGFS_MAGIC 0x64626720
38#define STATFS_DEVPTS_MAGIC 0x1cd1
39#define STATFS_ECRYPTFS_MAGIC 0xf15f
40#define STATFS_EFIVARFS_MAGIC 0xde5e81e4
41#define STATFS_EFS_MAGIC 0x414A53
42#define STATFS_EXOFS_MAGIC 0x5DF5
43#define STATFS_EXT2_MAGIC 0xEF53
44#define STATFS_EXT3_MAGIC 0xEF53
45#define STATFS_EXT4_MAGIC 0xEF53
46#define STATFS_F2FS_MAGIC 0xF2F52010
47#define STATFS_FUSE_MAGIC 0x65735546
48#define STATFS_FUTEXFS_MAGIC 0xBAD1DEA
49#define STATFS_GFS2_MAGIC 0x01161970
50#define STATFS_HFSPLUS_MAGIC 0x482b
51#define STATFS_HOSTFS_MAGIC 0x00c0ffee
52#define STATFS_HPFS_MAGIC 0xf995e849
53#define STATFS_HPPFS_MAGIC 0xb00000ee
54#define STATFS_HUGETLBFS_MAGIC 0x958458f6
55#define STATFS_ISOFS_MAGIC 0x9660
56#define STATFS_JFFS2_MAGIC 0x72b6
57#define STATFS_JFS_MAGIC 0x3153464a
58#define STATFS_LOGFS_MAGIC 0xc97e8168
59#define STATFS_MINIX2_MAGIC 0x2468
60#define STATFS_MINIX2_MAGIC2 0x2478
61#define STATFS_MINIX3_MAGIC 0x4d5a
62#define STATFS_MINIX_MAGIC 0x137F
63#define STATFS_MINIX_MAGIC2 0x138F
64#define STATFS_MQUEUE_MAGIC 0x19800202
65#define STATFS_MSDOS_MAGIC 0x4d44
66#define STATFS_NCP_MAGIC 0x564c
67#define STATFS_NFS_MAGIC 0x6969
68#define STATFS_NILFS_MAGIC 0x3434
69#define STATFS_NTFS_MAGIC 0x5346544e
70#define STATFS_OCFS2_MAGIC 0x7461636f
71#define STATFS_OMFS_MAGIC 0xC2993D87
72#define STATFS_OPENPROMFS_MAGIC 0x9fa1
73#define STATFS_PIPEFS_MAGIC 0x50495045
74#define STATFS_PROC_MAGIC 0x9fa0
75#define STATFS_PSTOREFS_MAGIC 0x6165676C
76#define STATFS_QNX4_MAGIC 0x002f
77#define STATFS_QNX6_MAGIC 0x68191122
78#define STATFS_RAMFS_MAGIC 0x858458f6
79#define STATFS_REISERFS_MAGIC 0x52654973
80#define STATFS_ROMFS_MAGIC 0x7275
81#define STATFS_SECURITYFS_MAGIC 0x73636673
82#define STATFS_SELINUXFS_MAGIC 0xf97cff8c
83#define STATFS_SMACKFS_MAGIC 0x43415d53
84#define STATFS_SMB_MAGIC 0x517B
85#define STATFS_SOCKFS_MAGIC 0x534F434B
86#define STATFS_SQUASHFS_MAGIC 0x73717368
87#define STATFS_SYSFS_MAGIC 0x62656572
88#define STATFS_TMPFS_MAGIC 0x01021994
89#define STATFS_UBIFS_MAGIC 0x24051905
90#define STATFS_UDF_MAGIC 0x15013346
91#define STATFS_UFS2_MAGIC 0x19540119
92#define STATFS_UFS_MAGIC 0x00011954
93#define STATFS_V9FS_MAGIC 0x01021997
94#define STATFS_VXFS_MAGIC 0xa501FCF5
95#define STATFS_XENFS_MAGIC 0xabba1974
96#define STATFS_XFS_MAGIC 0x58465342
97
98#endif /* UTIL_LINUX_STATFS_MAGIC_H */
99