Blame sysdeps/unix/sysv/linux/linux_fsinfo.h

Packit 6c4009
/* Constants from kernel header for various FSes.
Packit 6c4009
   Copyright (C) 1998-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _LINUX_FSINFO_H
Packit 6c4009
#define _LINUX_FSINFO_H	1
Packit 6c4009
Packit 6c4009
/* These definitions come from the kernel headers.  But we cannot
Packit 6c4009
   include the headers here because of type clashes.  If new
Packit 6c4009
   filesystem types will become available we have to add the
Packit 6c4009
   appropriate definitions here.  */
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `adfs' filesystem.  */
Packit 6c4009
#define ADFS_SUPER_MAGIC	0xadf5
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `affs' filesystem.  */
Packit 6c4009
#define AFFS_SUPER_MAGIC	0xadff
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `afs' filesystem.  */
Packit 6c4009
#define AFS_SUPER_MAGIC		0x5346414F
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `anon_inodefs' filesystem.  */
Packit 6c4009
#define ANON_INODE_FS_MAGIC	0x09041934
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `autofs' filesystem.  */
Packit 6c4009
#define AUTOFS_SUPER_MAGIC	0x187
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `bdev' filesystem.  */
Packit 6c4009
#define BDEVFS_MAGIC		0x62646576
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `bfs' filesystem.  */
Packit 6c4009
#define BFS_MAGIC		0x1badface
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `binfmt_misc' filesystem.  */
Packit 6c4009
#define BINFMTFS_MAGIC		0x42494e4d
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `btrfs' filesystem.  */
Packit 6c4009
#define BTRFS_SUPER_MAGIC	0x9123683e
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `btrfs_test_fs' filesystem.  */
Packit 6c4009
#define BTRFS_TEST_MAGIC	0x73727279
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `cgroup' filesystem.  */
Packit 6c4009
#define CGROUP_SUPER_MAGIC	0x27e0eb
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `coda' filesystem.  */
Packit 6c4009
#define CODA_SUPER_MAGIC	0x73757245
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `coherent' filesystem.  */
Packit 6c4009
#define COH_SUPER_MAGIC		0x012ff7b7
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `cramfs' filesystem.  */
Packit 6c4009
#define CRAMFS_MAGIC		0x28cd3d45
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `cramfs' filesystem w/opposite endianness.  */
Packit 6c4009
#define CRAMFS_MAGIC_WEND	0x453dcd28
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `debugfs' filesystem.  */
Packit 6c4009
#define DEBUGFS_MAGIC		0x64626720
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `devfs' filesystem.  */
Packit 6c4009
#define DEVFS_SUPER_MAGIC	0x1373
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `devpts' filesystem.  */
Packit 6c4009
#define DEVPTS_SUPER_MAGIC	0x1cd1
Packit 6c4009
Packit 6c4009
/* Constants that identifies the `ecryptfs' filesystem.  */
Packit 6c4009
#define ECRYPTFS_SUPER_MAGIC	0xf15f
Packit 6c4009
Packit 6c4009
/* Constants that identifies the `efs' filesystem.  */
Packit 6c4009
#define EFS_SUPER_MAGIC		0x414a53
Packit 6c4009
#define EFS_MAGIC		0x072959
Packit 6c4009
Packit 6c4009
/* Constants that identifies the `evivar' filesystem.  */
Packit 6c4009
#define EFIVARFS_MAGIC		0xde5e81e4
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ext2' filesystem.  */
Packit 6c4009
#define EXT2_SUPER_MAGIC	0xef53
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ext3' filesystem.  */
Packit 6c4009
#define EXT3_SUPER_MAGIC	0xef53
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ext3' filesystem.  */
Packit 6c4009
#define EXT4_SUPER_MAGIC	0xef53
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `f2fs' filesystem.  */
Packit 6c4009
#define F2FS_SUPER_MAGIC	0xf2f52010
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `futexfs' filesystem.  */
Packit 6c4009
#define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `hostfs' filesystem.  */
Packit 6c4009
#define HOSTFS_SUPER_MAGIC	0x00c0ffee
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `hpfs' filesystem.  */
Packit 6c4009
#define HPFS_SUPER_MAGIC	0xf995e849
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `hugetlbfs' filesystem.  */
Packit 6c4009
#define HUGETLBFS_MAGIC 	0x958458f6
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `iso9660' filesystem.  */
Packit 6c4009
#define ISOFS_SUPER_MAGIC	0x9660
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `jffs' filesystem.  */
Packit 6c4009
#define JFFS_SUPER_MAGIC	0x07c0
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `jffs2' filesystem.  */
Packit 6c4009
#define JFFS2_SUPER_MAGIC	0x72b6
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `jfs' filesystem.  */
Packit 6c4009
#define JFS_SUPER_MAGIC		0x3153464a
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `logfs' filesystem.  */
Packit 6c4009
#define LOGFS_MAGIC_U32		0xc97e8168u
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `lustre' filesystem.  */
Packit 6c4009
#define LUSTRE_SUPER_MAGIC	0x0BD00BD0
Packit 6c4009
Packit 6c4009
/* Constants that identify the `minix2' filesystem.  */
Packit 6c4009
#define MINIX2_SUPER_MAGIC	0x2468
Packit 6c4009
#define MINIX2_SUPER_MAGIC2	0x2478
Packit 6c4009
Packit 6c4009
/* Constants that identify the `minix3' filesystem.  */
Packit 6c4009
#define MINIX3_SUPER_MAGIC	0x4d5a
Packit 6c4009
Packit 6c4009
/* Constants that identify the `minix' filesystem.  */
Packit 6c4009
#define MINIX_SUPER_MAGIC	0x137f
Packit 6c4009
#define MINIX_SUPER_MAGIC2	0x138F
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `msdos' filesystem.  */
Packit 6c4009
#define MSDOS_SUPER_MAGIC	0x4d44
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `mtd_inodefs' filesystem.  */
Packit 6c4009
#define MTD_INODE_FS_MAGIC	0x11307854
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ncp' filesystem.  */
Packit 6c4009
#define NCP_SUPER_MAGIC		0x564c
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `nilfs' filesystem.  */
Packit 6c4009
#define NILFS_SUPER_MAGIC	0x3434
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `nfs' filesystem.  */
Packit 6c4009
#define NFS_SUPER_MAGIC		0x6969
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ntfs' filesystem.  */
Packit 6c4009
#define NTFS_SUPER_MAGIC	0x5346544e
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `openpromfs' filesystem.  */
Packit 6c4009
#define OPENPROM_SUPER_MAGIC	0x9fa1
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `pipefs' filesystem.  */
Packit 6c4009
#define PIPEFS_MAGIC		0x50495045
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `proc' filesystem.  */
Packit 6c4009
#define PROC_SUPER_MAGIC	0x9fa0
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `pstorefs' filesystem.  */
Packit 6c4009
#define PSTOREFS_MAGIC		0x6165676C
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `qnx4' filesystem.  */
Packit 6c4009
#define QNX4_SUPER_MAGIC	0x002f
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `qnx6' filesystem.  */
Packit 6c4009
#define QNX6_SUPER_MAGIC	0x68191122
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `ramfs' filesystem.  */
Packit 6c4009
#define RAMFS_MAGIC		0x858458f6
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `reiser' filesystem.  */
Packit 6c4009
#define REISERFS_SUPER_MAGIC	0x52654973
Packit 6c4009
Packit 6c4009
#define REISERFS_SUPER_MAGIC_STRING	"ReIsErFs"
Packit 6c4009
#define REISER2FS_SUPER_MAGIC_STRING	"ReIsEr2Fs"
Packit 6c4009
#define REISER2FS_JR_SUPER_MAGIC_STRING	"ReIsEr3Fs"
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `romfs' filesystem.  */
Packit 6c4009
#define ROMFS_SUPER_MAGIC	0x7275
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `securityfs' filesystem.  */
Packit 6c4009
#define SECURITYFS_MAGIC	0x73636673
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `selinuxfs' filesystem.  */
Packit 6c4009
#define SELINUX_MAGIC		0xf97cff8c
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `smackfs' filesystem.  */
Packit 6c4009
#define SMACK_MAGIC		0x43415d53	/* "SMAC" */
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `shm' filesystem.  */
Packit 6c4009
#define SHMFS_SUPER_MAGIC	0x01021994
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `smb' filesystem.  */
Packit 6c4009
#define SMB_SUPER_MAGIC		0x517b
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `sockfs' filesystem.  */
Packit 6c4009
#define SOCKFS_MAGIC		0x534F434B
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `squashfs' filesystem.  */
Packit 6c4009
#define SQUASHFS_MAGIC		0x73717368
Packit 6c4009
Packit 6c4009
/* Constant that identifies the end of stacks allocated by the kernel.  */
Packit 6c4009
#define STACK_END_MAGIC		0x57AC6E9D
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `sysfs' filesystem.  */
Packit 6c4009
#define SYSFS_MAGIC		0x62656572
Packit 6c4009
Packit 6c4009
/* Constants that identify the `sysV' filesystem.  */
Packit 6c4009
#define SYSV2_SUPER_MAGIC	0x012ff7b6
Packit 6c4009
#define SYSV4_SUPER_MAGIC	0x012ff7b5
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `tmpfs' filesystem.  */
Packit 6c4009
#define TMPFS_MAGIC		0x01021994
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `udf' filesystem.  */
Packit 6c4009
#define UDF_SUPER_MAGIC		0x15013346
Packit 6c4009
Packit 6c4009
/* Constant that identify the `ufs' filesystem.  */
Packit 6c4009
#define UFS_MAGIC		0x00011954
Packit 6c4009
#define UFS_CIGAM		0x54190100 /* byteswapped MAGIC */
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `usbdevfs' filesystem.  */
Packit 6c4009
#define USBDEVFS_SUPER_MAGIC	0x9fa2
Packit 6c4009
#define USBDEVICE_SUPER_MAGIC	0x9fa2
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `9p' filesystem.  */
Packit 6c4009
#define V9FS_MAGIC		0x01021997
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `vxfs' filesystem.  */
Packit 6c4009
#define VXFS_SUPER_MAGIC	0xa501fcf5
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `xenfs' filesystem.  */
Packit 6c4009
#define XENFS_SUPER_MAGIC	0xabba1974
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `xenix' filesystem.  */
Packit 6c4009
#define XENIX_SUPER_MAGIC	0x012ff7b4
Packit 6c4009
Packit 6c4009
/* Constant that identifies the `xfs' filesystem.  */
Packit 6c4009
#define XFS_SUPER_MAGIC		0x58465342
Packit 6c4009
Packit 6c4009
/* Maximum link counts.  */
Packit 6c4009
#define COH_LINK_MAX		10000
Packit 6c4009
#define EXT2_LINK_MAX		32000
Packit 6c4009
#define EXT4_LINK_MAX		65000
Packit 6c4009
#define F2FS_LINK_MAX		32000
Packit 6c4009
#define LUSTRE_LINK_MAX		EXT4_LINK_MAX
Packit 6c4009
#define MINIX2_LINK_MAX		65530
Packit 6c4009
#define MINIX_LINK_MAX		250
Packit 6c4009
#define REISERFS_LINK_MAX	64535
Packit 6c4009
#define SYSV_LINK_MAX		126     /* 127? 251? */
Packit 6c4009
#define UFS_LINK_MAX		EXT2_LINK_MAX
Packit 6c4009
#define XENIX_LINK_MAX		126     /* ?? */
Packit 6c4009
#define XFS_LINK_MAX		2147483647
Packit 6c4009
Packit 6c4009
/* The Linux kernel header mentioned this as a kind of generic value.  */
Packit 6c4009
#define LINUX_LINK_MAX	127
Packit 6c4009
Packit 6c4009
Packit 6c4009
#endif	/* linux_fsinfo.h */