summaryrefslogtreecommitdiffstats
path: root/src/basic/filesystems-gperf.gperf
blob: c82fe98227b8c2e71bedbc92841b41c2cb1435eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#include <linux/magic.h>

#include "filesystems.h"
#include "missing_magic.h"
#include "stat-util.h"

struct FilesystemMagic {
        const char *name;
        statfs_f_type_t magic[FILESYSTEM_MAGIC_MAX];
};
%}
struct FilesystemMagic;
%language=ANSI-C
%define hash-function-name filesystems_gperf_hash
%define lookup-function-name filesystems_gperf_lookup
%define slot-name name
%readonly-tables
%omit-struct-type
%struct-type
%includes
%%
apparmorfs,      {AAFS_MAGIC}
adfs,            {ADFS_SUPER_MAGIC}
affs,            {AFFS_SUPER_MAGIC}
afs,             {AFS_FS_MAGIC, AFS_SUPER_MAGIC}
anon_inodefs,    {ANON_INODE_FS_MAGIC}
autofs,          {AUTOFS_SUPER_MAGIC}
balloon-kvm,     {BALLOON_KVM_MAGIC}
bcachefs,        {BCACHEFS_SUPER_MAGIC}
bdev,            {BDEVFS_MAGIC}
binder,          {BINDERFS_SUPER_MAGIC}
binfmt_misc,     {BINFMTFS_MAGIC}
bpf,             {BPF_FS_MAGIC}
btrfs,           {BTRFS_SUPER_MAGIC}
btrfs_test_fs,   {BTRFS_TEST_MAGIC}
# cpuset's magic got reassigned to cgroupfs
cpuset,          {CGROUP_SUPER_MAGIC}
ceph,            {CEPH_SUPER_MAGIC}
cgroup2,         {CGROUP2_SUPER_MAGIC}
# note that the cgroupfs magic got reassigned from cpuset
cgroup,          {CGROUP_SUPER_MAGIC}
cifs,            {CIFS_SUPER_MAGIC, SMB2_SUPER_MAGIC}
coda,            {CODA_SUPER_MAGIC}
configfs,        {CONFIGFS_MAGIC}
cramfs,          {CRAMFS_MAGIC}
dax,             {DAXFS_MAGIC}
debugfs,         {DEBUGFS_MAGIC}
devmem,          {DEVMEM_MAGIC}
devpts,          {DEVPTS_SUPER_MAGIC}
# devtmpfs is just a special instance of tmpfs, hence it reports its magic
devtmpfs,        {TMPFS_MAGIC}
dmabuf,          {DMA_BUF_MAGIC}
ecryptfs,        {ECRYPTFS_SUPER_MAGIC}
efivarfs,        {EFIVARFS_MAGIC}
efs,             {EFS_SUPER_MAGIC}
erofs,           {EROFS_SUPER_MAGIC_V1}
# ext2 + ext3 + ext4 use the same magic
ext2,            {EXT2_SUPER_MAGIC}
ext3,            {EXT3_SUPER_MAGIC}
ext4,            {EXT4_SUPER_MAGIC}
exfat,           {EXFAT_SUPER_MAGIC}
f2fs,            {F2FS_SUPER_MAGIC}
# fuseblk is so closely related to fuse that it shares the same magic
fuseblk,         {FUSE_SUPER_MAGIC}
fuse,            {FUSE_SUPER_MAGIC}
fusectl,         {FUSE_CTL_SUPER_MAGIC}
# gfs is an old version of gfs2 and reuses the magic
gfs,             {GFS2_MAGIC}
gfs2,            {GFS2_MAGIC}
hostfs,          {HOSTFS_SUPER_MAGIC}
hpfs,            {HPFS_SUPER_MAGIC}
hugetlbfs,       {HUGETLBFS_MAGIC}
iso9660,         {ISOFS_SUPER_MAGIC}
jffs2,           {JFFS2_SUPER_MAGIC}
minix,           {MINIX_SUPER_MAGIC, MINIX_SUPER_MAGIC2, MINIX2_SUPER_MAGIC, MINIX2_SUPER_MAGIC2, MINIX3_SUPER_MAGIC}
mqueue,          {MQUEUE_MAGIC}
# msdos is an older legacy version of vfat, shares the magic
msdos,           {MSDOS_SUPER_MAGIC}
# ncp/ncpfs have been removed from the kernel, but ncpfs was the official name
ncp,             {NCP_SUPER_MAGIC}
ncpfs,           {NCP_SUPER_MAGIC}
# nfs is the old version of nfs4, and they share the same magic
nfs,             {NFS_SUPER_MAGIC}
nfs4,            {NFS_SUPER_MAGIC}
nilfs2,          {NILFS_SUPER_MAGIC}
nsfs,            {NSFS_MAGIC}
ntfs,            {NTFS_SB_MAGIC}
ntfs3,           {NTFS3_SUPER_MAGIC}
ocfs2,           {OCFS2_SUPER_MAGIC}
openpromfs,      {OPENPROM_SUPER_MAGIC}
orangefs,        {ORANGEFS_DEVREQ_MAGIC}
overlay,         {OVERLAYFS_SUPER_MAGIC}
pidfs,           {PID_FS_MAGIC}
pipefs,          {PIPEFS_MAGIC}
ppc-cmm,         {PPC_CMM_MAGIC}
proc,            {PROC_SUPER_MAGIC}
pstore,          {PSTOREFS_MAGIC}
# pvfs2 is the old version of orangefs
pvfs2,           {ORANGEFS_DEVREQ_MAGIC}
qnx4,            {QNX4_SUPER_MAGIC}
qnx6,            {QNX6_SUPER_MAGIC}
ramfs,           {RAMFS_MAGIC}
resctrl,         {RDTGROUP_SUPER_MAGIC}
reiserfs,        {REISERFS_SUPER_MAGIC}
rpc_pipefs,      {RPC_PIPEFS_SUPER_MAGIC}
secretmem,       {SECRETMEM_MAGIC}
securityfs,      {SECURITYFS_MAGIC}
selinuxfs,       {SELINUX_MAGIC}
shiftfs,         {SHIFTFS_MAGIC}
smackfs,         {SMACK_MAGIC}
# smb3 is an alias for cifs
smb3,            {CIFS_SUPER_MAGIC}
# smbfs was removed from the kernel in 2010, the magic remains
smbfs,           {SMB_SUPER_MAGIC}
sockfs,          {SOCKFS_MAGIC}
squashfs,        {SQUASHFS_MAGIC}
sysfs,           {SYSFS_MAGIC}
# note that devtmpfs shares the same magic with tmpfs, given it is just a special named instance of it.
tmpfs,           {TMPFS_MAGIC}
tracefs,         {TRACEFS_MAGIC}
udf,             {UDF_SUPER_MAGIC}
usbdevfs,        {USBDEVICE_SUPER_MAGIC}
vboxsf,          {VBOXSF_SUPER_MAGIC}
# note that msdos shares the same magic (and is the older version)
vfat,            {MSDOS_SUPER_MAGIC}
v9fs,            {V9FS_MAGIC}
xenfs,           {XENFS_SUPER_MAGIC}
xfs,             {XFS_SUPER_MAGIC}
z3fold,          {Z3FOLD_MAGIC}
zonefs,          {ZONEFS_MAGIC}
zsmalloc,        {ZSMALLOC_MAGIC}