summaryrefslogtreecommitdiffstats
path: root/src/fs-is-local.h
blob: 13917e2df9fc412b467033499785b6d386d87abb (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
134
135
136
137
138
/* Map each S_MAGIC_* value to 1, 0 or -1.
   1 if it is known to be a remote file system type,
   0 if it is known to be a local file system type, or -1 otherwise.  */
static inline int
is_local_fs_type (unsigned long int magic)
{
  switch (magic)
    {
      case S_MAGIC_AAFS: return 1;
      case S_MAGIC_ACFS: return 0;
      case S_MAGIC_ADFS: return 1;
      case S_MAGIC_AFFS: return 1;
      case S_MAGIC_AFS: return 0;
      case S_MAGIC_ANON_INODE_FS: return 1;
      case S_MAGIC_AUFS: return 0;
      case S_MAGIC_AUTOFS: return 1;
      case S_MAGIC_BALLOON_KVM: return 1;
      case S_MAGIC_BEFS: return 1;
      case S_MAGIC_BDEVFS: return 1;
      case S_MAGIC_BFS: return 1;
      case S_MAGIC_BINDERFS: return 1;
      case S_MAGIC_BPF_FS: return 1;
      case S_MAGIC_BINFMTFS: return 1;
      case S_MAGIC_BTRFS: return 1;
      case S_MAGIC_BTRFS_TEST: return 1;
      case S_MAGIC_CEPH: return 0;
      case S_MAGIC_CGROUP: return 1;
      case S_MAGIC_CGROUP2: return 1;
      case S_MAGIC_CIFS: return 0;
      case S_MAGIC_CODA: return 0;
      case S_MAGIC_COH: return 1;
      case S_MAGIC_CONFIGFS: return 1;
      case S_MAGIC_CRAMFS: return 1;
      case S_MAGIC_CRAMFS_WEND: return 1;
      case S_MAGIC_DAXFS: return 1;
      case S_MAGIC_DEBUGFS: return 1;
      case S_MAGIC_DEVFS: return 1;
      case S_MAGIC_DEVPTS: return 1;
      case S_MAGIC_DMA_BUF: return 1;
      case S_MAGIC_ECRYPTFS: return 1;
      case S_MAGIC_EFIVARFS: return 1;
      case S_MAGIC_EFS: return 1;
      case S_MAGIC_EROFS_V1: return 1;
      case S_MAGIC_EXFS: return 1;
      case S_MAGIC_EXOFS: return 1;
      case S_MAGIC_EXT: return 1;
      case S_MAGIC_EXT2: return 1;
      case S_MAGIC_EXT2_OLD: return 1;
      case S_MAGIC_F2FS: return 1;
      case S_MAGIC_FAT: return 1;
      case S_MAGIC_FHGFS: return 0;
      case S_MAGIC_FUSEBLK: return 0;
      case S_MAGIC_FUSECTL: return 0;
      case S_MAGIC_FUTEXFS: return 1;
      case S_MAGIC_GFS: return 0;
      case S_MAGIC_GPFS: return 0;
      case S_MAGIC_HFS: return 1;
      case S_MAGIC_HFS_PLUS: return 1;
      case S_MAGIC_HFS_X: return 1;
      case S_MAGIC_HOSTFS: return 1;
      case S_MAGIC_HPFS: return 1;
      case S_MAGIC_HUGETLBFS: return 1;
      case S_MAGIC_MTD_INODE_FS: return 1;
      case S_MAGIC_IBRIX: return 0;
      case S_MAGIC_INOTIFYFS: return 1;
      case S_MAGIC_ISOFS: return 1;
      case S_MAGIC_ISOFS_R_WIN: return 1;
      case S_MAGIC_ISOFS_WIN: return 1;
      case S_MAGIC_JFFS: return 1;
      case S_MAGIC_JFFS2: return 1;
      case S_MAGIC_JFS: return 1;
      case S_MAGIC_KAFS: return 0;
      case S_MAGIC_LOGFS: return 1;
      case S_MAGIC_LUSTRE: return 0;
      case S_MAGIC_M1FS: return 1;
      case S_MAGIC_MINIX: return 1;
      case S_MAGIC_MINIX_30: return 1;
      case S_MAGIC_MINIX_V2: return 1;
      case S_MAGIC_MINIX_V2_30: return 1;
      case S_MAGIC_MINIX_V3: return 1;
      case S_MAGIC_MQUEUE: return 1;
      case S_MAGIC_MSDOS: return 1;
      case S_MAGIC_NCP: return 0;
      case S_MAGIC_NFS: return 0;
      case S_MAGIC_NFSD: return 0;
      case S_MAGIC_NILFS: return 1;
      case S_MAGIC_NSFS: return 1;
      case S_MAGIC_NTFS: return 1;
      case S_MAGIC_OPENPROM: return 1;
      case S_MAGIC_OCFS2: return 0;
      case S_MAGIC_OVERLAYFS: return 0;
      case S_MAGIC_PANFS: return 0;
      case S_MAGIC_PIPEFS: return 0;
      case S_MAGIC_PPC_CMM: return 1;
      case S_MAGIC_PRL_FS: return 0;
      case S_MAGIC_PROC: return 1;
      case S_MAGIC_PSTOREFS: return 1;
      case S_MAGIC_QNX4: return 1;
      case S_MAGIC_QNX6: return 1;
      case S_MAGIC_RAMFS: return 1;
      case S_MAGIC_RDTGROUP: return 1;
      case S_MAGIC_REISERFS: return 1;
      case S_MAGIC_ROMFS: return 1;
      case S_MAGIC_RPC_PIPEFS: return 1;
      case S_MAGIC_SDCARDFS: return 1;
      case S_MAGIC_SECURITYFS: return 1;
      case S_MAGIC_SELINUX: return 1;
      case S_MAGIC_SMACK: return 1;
      case S_MAGIC_SMB: return 0;
      case S_MAGIC_SMB2: return 0;
      case S_MAGIC_SNFS: return 0;
      case S_MAGIC_SOCKFS: return 1;
      case S_MAGIC_SQUASHFS: return 1;
      case S_MAGIC_SYSFS: return 1;
      case S_MAGIC_SYSV2: return 1;
      case S_MAGIC_SYSV4: return 1;
      case S_MAGIC_TMPFS: return 1;
      case S_MAGIC_TRACEFS: return 1;
      case S_MAGIC_UBIFS: return 1;
      case S_MAGIC_UDF: return 1;
      case S_MAGIC_UFS: return 1;
      case S_MAGIC_UFS_BYTESWAPPED: return 1;
      case S_MAGIC_USBDEVFS: return 1;
      case S_MAGIC_V9FS: return 1;
      case S_MAGIC_VMHGFS: return 0;
      case S_MAGIC_VXFS: return 0;
      case S_MAGIC_VZFS: return 1;
      case S_MAGIC_WSLFS: return 1;
      case S_MAGIC_XENFS: return 1;
      case S_MAGIC_XENIX: return 1;
      case S_MAGIC_XFS: return 1;
      case S_MAGIC_XIAFS: return 1;
      case S_MAGIC_Z3FOLD: return 1;
      case S_MAGIC_ZFS: return 1;
      case S_MAGIC_ZSMALLOC: return 1;
      default: return -1;
    }
}