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.

170 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1990-2000 Microsoft Corporation
  3. Module Name:
  4. convert.hxx
  5. Abstract:
  6. This module contains the declaration of the CONVERT class, which
  7. implements the File System Conversion Utility.
  8. Author:
  9. Ramon Juan San Andres (ramonsa) 27-Sep-1991
  10. Revision History:
  11. --*/
  12. #if !defined( _CONVERT_ )
  13. #define _CONVERT_
  14. #include "program.hxx"
  15. #include "autoentr.hxx"
  16. #include "autoreg.hxx"
  17. #if defined(FE_SB) && defined(_X86_)
  18. #include "drive.hxx" // for DP_DRIVE class
  19. #endif
  20. //
  21. // Convert exit codes
  22. //
  23. #define EXIT_SUCCESS 0 // Volume Converted
  24. #define EXIT_SCHEDULED 1 // Conversion scheduled for next reboot
  25. #define EXIT_NOCANDO 2 // Specified conversion not available
  26. #define EXIT_UNKNOWN 3 // Unknown file system
  27. #define EXIT_ERROR 4 // Conversion error
  28. #define EXIT_NOFREESPACE 5 // Insufficient free space for conversion
  29. DECLARE_CLASS( STREAM_MESSAGE );
  30. DECLARE_CLASS( WSTRING );
  31. DECLARE_CLASS( CONVERT );
  32. class CONVERT : public PROGRAM {
  33. public:
  34. DECLARE_CONSTRUCTOR( CONVERT );
  35. NONVIRTUAL
  36. VOID
  37. Construct (
  38. );
  39. NONVIRTUAL
  40. ~CONVERT (
  41. );
  42. NONVIRTUAL
  43. BOOLEAN
  44. Initialize (
  45. OUT PINT ExitCode
  46. );
  47. NONVIRTUAL
  48. INT
  49. Convert (
  50. );
  51. #if defined(FE_SB) && defined(_X86_)
  52. // NEC98 '95.6.23
  53. // We need to use ChangeBPB1 and ChangeBPB2
  54. // We use these function when logicalsectorsize != phisicalsectorsize
  55. BOOLEAN
  56. ChangeBPB1(
  57. IN PCWSTRING NtDrive
  58. );
  59. BOOLEAN
  60. ChangeBPB2(
  61. );
  62. #endif
  63. private:
  64. NONVIRTUAL
  65. VOID
  66. Destroy (
  67. );
  68. NONVIRTUAL
  69. BOOLEAN
  70. RemoveScheduledAutoConv(
  71. );
  72. NONVIRTUAL
  73. PPATH
  74. FindSystemFile(
  75. IN PWSTR FileName
  76. );
  77. NONVIRTUAL
  78. BOOLEAN
  79. ParseArguments(
  80. OUT PINT ExitCode
  81. );
  82. NONVIRTUAL
  83. BOOLEAN
  84. ParseCommandLine (
  85. IN PCWSTRING CommandLine,
  86. IN BOOLEAN Interactive
  87. );
  88. NONVIRTUAL
  89. BOOLEAN
  90. Schedule (
  91. );
  92. NONVIRTUAL
  93. BOOLEAN
  94. ScheduleAutoConv(
  95. );
  96. DSTRING _DisplayDrive; // Display name of the given drive
  97. DSTRING _DosDrive; // Dos guid name or drive letter of the volume to convert
  98. DSTRING _GuidDrive; // Dos guid name of the volume to convert
  99. PATH _FullPath; // Mount point or drive letter of the volume to convert
  100. DSTRING _NtDrive; // NT drive name of volume to convert
  101. DSTRING _FsName; // Name of target file system
  102. DSTRING _CvtZoneFileName; // Convert Zone File Name
  103. BOOLEAN _Verbose; // Verbose flag
  104. BOOLEAN _NoSecurity; // NoSecurity flag
  105. BOOLEAN _NoChkdsk; // NoChkdsk flag
  106. BOOLEAN _ForceDismount; // Force Dismount flag
  107. BOOLEAN _Help; // Help flag
  108. BOOLEAN _Restart; // Restart flag
  109. #ifdef DBLSPACE_ENABLED
  110. BOOLEAN _Uncompress; // Set if we're converting a cvf
  111. DSTRING _CvfName; // If uncompress, the name of the cvf
  112. BOOLEAN _Compress; // Compress resulting filesystem
  113. UCHAR _SequenceNumber // sequence number of CVF to uncompress
  114. #endif // DBLSPACE_ENABLED
  115. #if defined(FE_SB) && defined(_X86_)
  116. // NEC98 '95.6.23
  117. // It use ChangeBPB1 and ChangeBPB2.
  118. USHORT _BytePerSec;
  119. UCHAR _SecPerClus;
  120. USHORT _Reserved;
  121. USHORT _SectorNum;
  122. USHORT _SecPerFat;
  123. ULONG _LargeSector;
  124. #endif
  125. PPATH _Autochk; // Path to Autochk
  126. PPATH _Autoconv; // Path to Autoconv
  127. };
  128. #endif // _CONVERT_