linux_fsinfo.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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, write to the Free
  14. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA. */
  16. #ifndef _LINUX_FSINFO_H
  17. #define _LINUX_FSINFO_H 1
  18. /* These definitions come from the kernel headers. But we cannot
  19. include the headers here because of type clashes. If new
  20. filesystem types will become available we have to add the
  21. appropriate definitions here.*/
  22. /* Constants that identify the `adfs' filesystem. */
  23. #define ADFS_SUPER_MAGIC 0xadf5
  24. /* Constants that identify the `affs' filesystem. */
  25. #define AFFS_SUPER_MAGIC 0xadff
  26. /* Constants that identify the `autofs' filesystem. */
  27. #define AUTOFS_SUPER_MAGIC 0x187
  28. /* Constants that identify the `bfs' filesystem. */
  29. #define BFS_MAGIC 0x1BADFACE
  30. /* Constants that identify the `coda' filesystem. */
  31. #define CODA_SUPER_MAGIC 0x73757245
  32. /* Constants that identify the `coherent' filesystem. */
  33. #define COH_SUPER_MAGIC 0x012ff7b7
  34. /* Constant that identifies the `ramfs' filesystem. */
  35. #define CRAMFS_MAGIC 0x28cd3d45
  36. /* Constant that identifies the `devfs' filesystem. */
  37. #define DEVFS_SUPER_MAGIC 0x1373
  38. /* Constant that identifies the `devpts' filesystem. */
  39. #define DEVPTS_SUPER_MAGIC 0x1cd1
  40. /* Constant that identifies the `efs' filesystem. */
  41. #define EFS_SUPER_MAGIC 0x414A53
  42. #define EFS_MAGIC 0x072959
  43. /* Constant that identifies the `ext2' and `ext3' filesystems. */
  44. #define EXT2_SUPER_MAGIC 0xef53
  45. /* Constant that identifies the `hpfs' filesystem. */
  46. #define HPFS_SUPER_MAGIC 0xf995e849
  47. /* Constant that identifies the `iso9660' filesystem. */
  48. #define ISOFS_SUPER_MAGIC 0x9660
  49. /* Constant that identifies the `jffs' filesystem. */
  50. #define JFFS_SUPER_MAGIC 0x07c0
  51. /* Constant that identifies the `jffs2' filesystem. */
  52. #define JFFS2_SUPER_MAGIC 0x72b6
  53. /* Constant that identifies the `jfs' filesystem. */
  54. #define JFS_SUPER_MAGIC 0x3153464a
  55. /* Constants that identify the `minix2' filesystem. */
  56. #define MINIX2_SUPER_MAGIC 0x2468
  57. #define MINIX2_SUPER_MAGIC2 0x2478
  58. /* Constants that identify the `minix' filesystem. */
  59. #define MINIX_SUPER_MAGIC 0x137f
  60. #define MINIX_SUPER_MAGIC2 0x138F
  61. /* Constants that identify the `msdos' filesystem. */
  62. #define MSDOS_SUPER_MAGIC 0x4d44
  63. /* Constants that identify the `ncp' filesystem. */
  64. #define NCP_SUPER_MAGIC 0x564c
  65. /* Constants that identify the `nfs' filesystem. */
  66. #define NFS_SUPER_MAGIC 0x6969
  67. /* Constants that identify the `ntfs' filesystem. */
  68. #define NTFS_SUPER_MAGIC 0x5346544e
  69. /* Constants that identify the `proc' filesystem. */
  70. #define PROC_SUPER_MAGIC 0x9fa0
  71. /* Constant that identifies the `usbdevfs' filesystem. */
  72. #define USBDEVFS_SUPER_MAGIC 0x9fa2
  73. /* Constants that identify the `qnx4' filesystem. */
  74. #define QNX4_SUPER_MAGIC 0x002f
  75. /* Constants that identify the `reiser' filesystem. */
  76. #define REISERFS_SUPER_MAGIC 0x52654973
  77. /* Constant that identifies the `romfs' filesystem. */
  78. #define ROMFS_SUPER_MAGIC 0x7275
  79. /* Constants that identify the `smb' filesystem. */
  80. #define SMB_SUPER_MAGIC 0x517b
  81. /* Constants that identify the `sysV' filesystem. */
  82. #define SYSV2_SUPER_MAGIC 0x012ff7b6
  83. #define SYSV4_SUPER_MAGIC 0x012ff7b5
  84. /* Constants that identify the `udf' filesystem. */
  85. #define UDF_SUPER_MAGIC 0x15013346
  86. /* Constants that identify the `ufs' filesystem. */
  87. #define UFS_MAGIC 0x00011954
  88. #define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
  89. /* Constants that identify the `xenix' filesystem. */
  90. #define XENIX_SUPER_MAGIC 0x012ff7b4
  91. /* Constant that identifies the `shm' filesystem. */
  92. #define SHMFS_SUPER_MAGIC 0x01021994
  93. /* Constants that identify the `xfs' filesystem. */
  94. #define XFS_SUPER_MAGIC 0x58465342
  95. /* Constants that identify the `vxfs' filesystem. */
  96. #define VXFS_SUPER_MAGIC 0xa501fcf5
  97. /* Maximum link counts. */
  98. #define COH_LINK_MAX 10000
  99. #define EXT2_LINK_MAX 32000
  100. #define MINIX2_LINK_MAX 65530
  101. #define MINIX_LINK_MAX 250
  102. #define REISERFS_LINK_MAX 64535
  103. #define SYSV_LINK_MAX 126 /* 127? 251? */
  104. #define UFS_LINK_MAX EXT2_LINK_MAX
  105. #define XENIX_LINK_MAX 126 /* ?? */
  106. #define XFS_LINK_MAX 2147483647
  107. /* The Linux kernel header mentioned this as a kind of generic value. */
  108. #define LINUX_LINK_MAX 127
  109. #endif /* linux_fsinfo.h */