linux_fsinfo.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /* Constants from kernel header for various FSes.
  2. Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _LINUX_FSINFO_H
  16. #define _LINUX_FSINFO_H 1
  17. /* These definitions come from the kernel headers. But we cannot
  18. include the headers here because of type clashes. If new
  19. filesystem types will become available we have to add the
  20. appropriate definitions here.*/
  21. /* Constants that identify the `adfs' filesystem. */
  22. #define ADFS_SUPER_MAGIC 0xadf5
  23. /* Constants that identify the `affs' filesystem. */
  24. #define AFFS_SUPER_MAGIC 0xadff
  25. /* Constants that identify the `autofs' filesystem. */
  26. #define AUTOFS_SUPER_MAGIC 0x187
  27. /* Constants that identify the `bfs' filesystem. */
  28. #define BFS_MAGIC 0x1BADFACE
  29. /* Constants that identify the `coda' filesystem. */
  30. #define CODA_SUPER_MAGIC 0x73757245
  31. /* Constants that identify the `coherent' filesystem. */
  32. #define COH_SUPER_MAGIC 0x012ff7b7
  33. /* Constant that identifies the `ramfs' filesystem. */
  34. #define CRAMFS_MAGIC 0x28cd3d45
  35. /* Constant that identifies the `devfs' filesystem. */
  36. #define DEVFS_SUPER_MAGIC 0x1373
  37. /* Constant that identifies the `devpts' filesystem. */
  38. #define DEVPTS_SUPER_MAGIC 0x1cd1
  39. /* Constant that identifies the `efs' filesystem. */
  40. #define EFS_SUPER_MAGIC 0x414A53
  41. #define EFS_MAGIC 0x072959
  42. /* Constant that identifies the `ext2' and `ext3' filesystems. */
  43. #define EXT2_SUPER_MAGIC 0xef53
  44. /* Constant that identifies the `hpfs' filesystem. */
  45. #define HPFS_SUPER_MAGIC 0xf995e849
  46. /* Constant that identifies the `iso9660' filesystem. */
  47. #define ISOFS_SUPER_MAGIC 0x9660
  48. /* Constant that identifies the `jffs' filesystem. */
  49. #define JFFS_SUPER_MAGIC 0x07c0
  50. /* Constant that identifies the `jffs2' filesystem. */
  51. #define JFFS2_SUPER_MAGIC 0x72b6
  52. /* Constant that identifies the `jfs' filesystem. */
  53. #define JFS_SUPER_MAGIC 0x3153464a
  54. /* Constants that identify the `minix2' filesystem. */
  55. #define MINIX2_SUPER_MAGIC 0x2468
  56. #define MINIX2_SUPER_MAGIC2 0x2478
  57. /* Constants that identify the `minix' filesystem. */
  58. #define MINIX_SUPER_MAGIC 0x137f
  59. #define MINIX_SUPER_MAGIC2 0x138F
  60. /* Constants that identify the `msdos' filesystem. */
  61. #define MSDOS_SUPER_MAGIC 0x4d44
  62. /* Constants that identify the `ncp' filesystem. */
  63. #define NCP_SUPER_MAGIC 0x564c
  64. /* Constants that identify the `nfs' filesystem. */
  65. #define NFS_SUPER_MAGIC 0x6969
  66. /* Constants that identify the `ntfs' filesystem. */
  67. #define NTFS_SUPER_MAGIC 0x5346544e
  68. /* Constants that identify the `proc' filesystem. */
  69. #define PROC_SUPER_MAGIC 0x9fa0
  70. /* Constant that identifies the `usbdevfs' filesystem. */
  71. #define USBDEVFS_SUPER_MAGIC 0x9fa2
  72. /* Constants that identify the `qnx4' filesystem. */
  73. #define QNX4_SUPER_MAGIC 0x002f
  74. /* Constants that identify the `reiser' filesystem. */
  75. #define REISERFS_SUPER_MAGIC 0x52654973
  76. /* Constant that identifies the `romfs' filesystem. */
  77. #define ROMFS_SUPER_MAGIC 0x7275
  78. /* Constants that identify the `smb' filesystem. */
  79. #define SMB_SUPER_MAGIC 0x517b
  80. /* Constants that identify the `sysV' filesystem. */
  81. #define SYSV2_SUPER_MAGIC 0x012ff7b6
  82. #define SYSV4_SUPER_MAGIC 0x012ff7b5
  83. /* Constants that identify the `udf' filesystem. */
  84. #define UDF_SUPER_MAGIC 0x15013346
  85. /* Constants that identify the `ufs' filesystem. */
  86. #define UFS_MAGIC 0x00011954
  87. #define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
  88. /* Constants that identify the `xenix' filesystem. */
  89. #define XENIX_SUPER_MAGIC 0x012ff7b4
  90. /* Constant that identifies the `shm' filesystem. */
  91. /* Mount as tmpfs. */
  92. #define SHMFS_SUPER_MAGIC_WITH_MMU 0x01021994
  93. /* The kernel uses a ramfs file system for tmpfs. */
  94. #define SHMFS_SUPER_MAGIC_WITHOUT_MMU 0x858458f6
  95. /* Constants that identify the `xfs' filesystem. */
  96. #define XFS_SUPER_MAGIC 0x58465342
  97. /* Constants that identify the `vxfs' filesystem. */
  98. #define VXFS_SUPER_MAGIC 0xa501fcf5
  99. /* Maximum link counts. */
  100. #define COH_LINK_MAX 10000
  101. #define EXT2_LINK_MAX 32000
  102. #define MINIX2_LINK_MAX 65530
  103. #define MINIX_LINK_MAX 250
  104. #define REISERFS_LINK_MAX 64535
  105. #define SYSV_LINK_MAX 126 /* 127? 251? */
  106. #define UFS_LINK_MAX EXT2_LINK_MAX
  107. #define XENIX_LINK_MAX 126 /* ?? */
  108. #define XFS_LINK_MAX 2147483647
  109. /* The Linux kernel header mentioned this as a kind of generic value. */
  110. #define LINUX_LINK_MAX 127
  111. #endif /* linux_fsinfo.h */