Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
8.7 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. AttrData.c
  5. Abstract:
  6. This module contains an initial image of the Attribute Definition File.
  7. Author:
  8. Tom Miller [TomM] 7-Jun-1991
  9. Revision History:
  10. --*/
  11. #include "NtfsProc.h"
  12. //
  13. // Define an array to hold the initial attribute definitions. This is
  14. // essentially the initial contents of the Attribute Definition File.
  15. // NTFS may find it convenient to use this module for attribute
  16. // definitions prior to getting an NTFS volume mounted, however it is valid
  17. // for NTFS to assume knowledge of the system-defined attributes without
  18. // consulting this table.
  19. //
  20. ATTRIBUTE_DEFINITION_COLUMNS NtfsAttributeDefinitions[ ] =
  21. {
  22. {{'$','S','T','A','N','D','A','R','D','_','I','N','F','O','R','M','A','T','I','O','N'},
  23. $STANDARD_INFORMATION, // Attribute code
  24. 0, // Display rule
  25. 0, // Collation rule
  26. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  27. SIZEOF_OLD_STANDARD_INFORMATION, // Minimum length
  28. sizeof(STANDARD_INFORMATION)}, // Maximum length
  29. {{'$','A','T','T','R','I','B','U','T','E','_','L','I','S','T'},
  30. $ATTRIBUTE_LIST, // Attribute code
  31. 0, // Display rule
  32. 0, // Collation rule
  33. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  34. 0, // Minimum length
  35. -1}, // Maximum length
  36. {{'$','F','I','L','E','_','N','A','M','E'},
  37. $FILE_NAME, // Attribute code
  38. 0, // Display rule
  39. 0, // Collation rule
  40. ATTRIBUTE_DEF_MUST_BE_RESIDENT | ATTRIBUTE_DEF_INDEXABLE, // Flags
  41. sizeof(FILE_NAME), // Minimum length
  42. sizeof(FILE_NAME) + (255 * sizeof(WCHAR))}, // Maximum length
  43. {{'$','O','B','J','E','C','T','_','I','D'},
  44. $OBJECT_ID, // Attribute code
  45. 0, // Display rule
  46. 0, // Collation rule
  47. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  48. 0, // Minimum length
  49. 256}, // Maximum length
  50. {{'$','S','E','C','U','R','I','T','Y','_','D','E','S','C','R','I','P','T','O','R'},
  51. $SECURITY_DESCRIPTOR, // Attribute code
  52. 0, // Display rule
  53. 0, // Collation rule
  54. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  55. 0, // Minimum length
  56. -1}, // Maximum length
  57. {{'$','V','O','L','U','M','E','_','N','A','M','E'},
  58. $VOLUME_NAME, // Attribute code
  59. 0, // Display rule
  60. 0, // Collation rule
  61. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  62. 2, // Minimum length
  63. 256}, // Maximum length
  64. {{'$','V','O','L','U','M','E','_','I','N','F','O','R','M','A','T','I','O','N'},
  65. $VOLUME_INFORMATION, // Attribute code
  66. 0, // Display rule
  67. 0, // Collation rule
  68. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  69. FIELD_OFFSET( VOLUME_INFORMATION, LastMountedMajorVersion), // Minimum length
  70. FIELD_OFFSET( VOLUME_INFORMATION, LastMountedMajorVersion)}, // Maximum length
  71. {{'$','D','A','T','A'},
  72. $DATA, // Attribute code
  73. 0, // Display rule
  74. 0, // Collation rule
  75. 0, // Flags
  76. 0, // Minimum length
  77. -1}, // Maximum length
  78. {{'$','I','N','D','E','X','_','R','O','O','T'},
  79. $INDEX_ROOT, // Attribute code
  80. 0, // Display rule
  81. 0, // Collation rule
  82. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  83. 0, // Minimum length
  84. -1}, // Maximum length
  85. {{'$','I','N','D','E','X','_','A','L','L','O','C','A','T','I','O','N'},
  86. $INDEX_ALLOCATION, // Attribute code
  87. 0, // Display rule
  88. 0, // Collation rule
  89. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  90. 0, // Minimum length
  91. -1}, // Maximum length
  92. {{'$','B','I','T','M','A','P'},
  93. $BITMAP, // Attribute code
  94. 0, // Display rule
  95. 0, // Collation rule
  96. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  97. 0, // Minimum length
  98. -1}, // Maximum length
  99. {{'$','R','E','P','A','R','S','E','_','P','O','I','N','T'},
  100. $REPARSE_POINT, // Attribute code
  101. 0, // Display rule
  102. 0, // Collation rule
  103. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  104. 0, // Minimum length
  105. 16*1024}, // Maximum length
  106. {{'$','E','A','_','I','N','F','O','R','M','A','T','I','O','N'},
  107. $EA_INFORMATION, // Attribute code
  108. 0, // Display rule
  109. 0, // Collation rule
  110. ATTRIBUTE_DEF_MUST_BE_RESIDENT, // Flags
  111. sizeof(EA_INFORMATION), // Minimum length
  112. sizeof(EA_INFORMATION)}, // Maximum length
  113. {{'$','E','A',},
  114. $EA, // Attribute code
  115. 0, // Display rule
  116. 0, // Collation rule
  117. 0, // Flags
  118. 0, // Minimum length
  119. 0x10000}, // Maximum length
  120. {{0,0,0,0},
  121. 0xF0,
  122. 0,
  123. 0,
  124. 0,
  125. 0},
  126. {{'$','L','O','G','G','E','D','_','U','T','I','L','I','T','Y','_','S','T','R','E','A','M'},
  127. $LOGGED_UTILITY_STREAM, // Attribute code
  128. 0, // Display rule
  129. 0, // Collation rule
  130. ATTRIBUTE_DEF_LOG_NONRESIDENT, // Flags
  131. 0, // Minimum length
  132. 0x10000}, // Maximum length
  133. {{0, 0, 0, 0},
  134. $UNUSED, // Attribute code
  135. 0, // Display rule
  136. 0, // Collation rule
  137. 0, // Flags
  138. 0, // Minimum length
  139. 0}, // Maximum length
  140. };
  141. //
  142. // The number of attributes in the above table, including the end record.
  143. //
  144. ULONG NtfsAttributeDefinitionsCount = sizeof( NtfsAttributeDefinitions ) / sizeof( ATTRIBUTE_DEFINITION_COLUMNS );