Leaked source code of windows server 2003
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.

216 lines
5.9 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. ifsserv.hxx
  5. Abstract:
  6. Contains prototypes for entry points to the IFS
  7. utility DLLs.
  8. Environment:
  9. User Mode
  10. --*/
  11. #if !defined ( _IFS_SERV_ )
  12. #define _IFS_SERV_
  13. #if ( defined( _AUTOCHECK_ ) || defined( _EFICHECK_ ) ) && !defined( _SETUP_LOADER_ )
  14. #define FAR
  15. #define WINAPI __stdcall
  16. #define APIENTRY WINAPI
  17. #endif // _AUTOCHECK_ || _SETUP_LOADER_
  18. #if !defined(_IFS_ENTRY_)
  19. //
  20. // Internal definitions for Flags field in CHKDSKEX_FN_PARAM
  21. //
  22. #define CHKDSK_RECOVER_FREE_SPACE 0x00000002UL
  23. #define CHKDSK_RECOVER_ALLOC_SPACE 0x00000004UL
  24. //
  25. // External definitions for Flags field in CHKDSKEX_FN_PARAM
  26. //
  27. // CHKDSK_VERBOSE
  28. // - For FAT, chkdsk will print every filename being processed
  29. // - For NTFS, chkdsk will print clean up messages
  30. // CHKDSK_RECOVER
  31. // - Perform sector checking on free and allocated space
  32. // CHKDSK_EXTEND
  33. // - For NTFS, chkdsk will extend a volume
  34. // CHKDSK_DOWNGRADE (for NT 5 or later but obsolete anyway)
  35. // - For NTFS, this downgrade a volume from most recent NTFS version
  36. // CHKDSK_ENABLE_UPGRADE (for NT 5 or later but obsolete anyway)
  37. // - For NTFS, this upgrades a volume to most recent NTFS version
  38. // CHKDSK_RESIZE_LOGFILE
  39. // - For NTFS, this changes the size of the logfile
  40. // CHKDSK_CHECK_IF_DIRTY
  41. // - Perform consistency check only if the volume is dirty
  42. // CHKDSK_FORCE
  43. // - Forces the volume to dismount first if necessary (implies /F)
  44. // CHKDSK_SKIP_INDEX_SCAN
  45. // - Skip the scanning of each index entry
  46. // CHKDSK_SKIP_CYCLE_SCAN
  47. // - Skip the checking of cycles within the directory tree
  48. #define CHKDSK_VERBOSE 0x00000001UL
  49. #define CHKDSK_RECOVER (CHKDSK_RECOVER_FREE_SPACE | \
  50. CHKDSK_RECOVER_ALLOC_SPACE)
  51. #define CHKDSK_EXTEND 0x00000008UL
  52. #define CHKDSK_DOWNGRADE 0x00000010UL
  53. #define CHKDSK_ENABLE_UPGRADE 0x00000020UL
  54. #define CHKDSK_RESIZE_LOGFILE 0x00000040UL
  55. #define CHKDSK_CHECK_IF_DIRTY 0x00000080UL
  56. #define CHKDSK_FORCE 0x00000100UL
  57. #define CHKDSK_SKIP_INDEX_SCAN 0x00000200UL
  58. #define CHKDSK_SKIP_CYCLE_SCAN 0x00000400UL
  59. typedef struct _CHKDSKEX_FN_PARAM {
  60. UCHAR Major; // initial version is 1.0
  61. UCHAR Minor;
  62. ULONG Flags;
  63. ULONG LogFileSize;
  64. PPATH PathToCheck; // path including mount points
  65. PPATH RootPath; // path from the root of the actual drive
  66. } CHKDSKEX_FN_PARAM, *PCHKDSKEX_FN_PARAM;
  67. //
  68. // External definitions for Flags field in FORMATEX_FN_PARAM
  69. //
  70. #define FORMAT_QUICK 0x00000001UL
  71. #define FORMAT_BACKWARD_COMPATIBLE 0x00000002UL
  72. #define FORMAT_FORCE 0x00000004UL
  73. // FORMAT_QUICK
  74. // - Performs a quick format
  75. // FORMAT_BACKWARD_COMPATIBLE
  76. // - Formats a volume to be backward compatible to an older version of NTFS volume
  77. // FORMAT_FORCE
  78. // - Forces the volume to dismount first if necessary
  79. typedef struct _FORMATEX_FN_PARAM {
  80. UCHAR Major; // initial version is 1.0
  81. UCHAR Minor;
  82. ULONG Flags;
  83. PCWSTRING LabelString; // supplies the volume's label
  84. ULONG ClusterSize; // supplies the cluster size for the volume
  85. } FORMATEX_FN_PARAM, *PFORMATEX_FN_PARAM;
  86. #endif // _IFS_ENTRY_
  87. extern "C"
  88. BOOLEAN
  89. FAR APIENTRY
  90. Chkdsk(
  91. IN PCWSTRING NtDriveName,
  92. IN OUT PMESSAGE Message,
  93. IN BOOLEAN Fix,
  94. IN BOOLEAN Verbose,
  95. IN BOOLEAN OnlyIfDirty,
  96. IN BOOLEAN Recover,
  97. IN PPATH PathToCheck,
  98. IN BOOLEAN Extend,
  99. IN BOOLEAN ResizeLogFile,
  100. IN ULONG LogFilesize,
  101. OUT PULONG ExitStatus
  102. );
  103. extern "C"
  104. BOOLEAN
  105. FAR APIENTRY
  106. ChkdskEx(
  107. IN PCWSTRING NtDriveName,
  108. IN OUT PMESSAGE Message,
  109. IN BOOLEAN Fix,
  110. IN PCHKDSKEX_FN_PARAM Param,
  111. OUT PULONG ExitStatus
  112. );
  113. extern "C"
  114. BOOLEAN
  115. FAR APIENTRY
  116. Format(
  117. IN PCWSTRING NtDriveName,
  118. IN OUT PMESSAGE Message,
  119. IN BOOLEAN Quick,
  120. IN BOOLEAN BackwardCompatible,
  121. IN MEDIA_TYPE MediaType,
  122. IN PCWSTRING LabelString,
  123. IN ULONG ClusterSize
  124. );
  125. extern "C"
  126. BOOLEAN
  127. FAR APIENTRY
  128. FormatEx(
  129. IN PCWSTRING NtDriveName,
  130. IN OUT PMESSAGE Message,
  131. IN PFORMATEX_FN_PARAM Param,
  132. IN MEDIA_TYPE MediaType
  133. );
  134. extern "C"
  135. BOOLEAN
  136. FAR APIENTRY
  137. Recover(
  138. IN PPATH RecFilePath,
  139. IN OUT PMESSAGE Message
  140. );
  141. extern "C"
  142. BOOLEAN
  143. FAR APIENTRY
  144. Extend(
  145. IN PCWSTRING NtDriveName,
  146. IN OUT PMESSAGE Message,
  147. IN BOOLEAN Verify
  148. );
  149. #if !defined(_IFS_ENTRY_)
  150. //
  151. // Convert status code
  152. //
  153. typedef enum _CONVERT_STATUS {
  154. CONVERT_STATUS_CONVERTED,
  155. CONVERT_STATUS_INVALID_FILESYSTEM,
  156. CONVERT_STATUS_CONVERSION_NOT_AVAILABLE,
  157. CONVERT_STATUS_CANNOT_LOCK_DRIVE,
  158. CONVERT_STATUS_ERROR,
  159. CONVERT_STATUS_INSUFFICIENT_SPACE,
  160. CONVERT_STATUS_NTFS_RESERVED_NAMES,
  161. CONVERT_STATUS_DRIVE_IS_DIRTY,
  162. CONVERT_STATUS_INSUFFICIENT_FREE_SPACE
  163. } CONVERT_STATUS, *PCONVERT_STATUS;
  164. #endif // _IFS_ENTRY_
  165. extern "C"
  166. BOOLEAN
  167. FAR APIENTRY
  168. Convert(
  169. IN PCWSTRING NtDriveName,
  170. IN PCWSTRING FsName,
  171. IN OUT PMESSAGE Message,
  172. IN BOOLEAN Verbose,
  173. IN BOOLEAN Pause,
  174. OUT PCONVERT_STATUS Status
  175. );
  176. #endif // _IFS_SERV_