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.

192 lines
3.1 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* WFDISK.C - */
  4. /* */
  5. /* Ported code from wfdisk.asm */
  6. /* */
  7. /****************************************************************************/
  8. #include "winfile.h"
  9. #include "winnet.h"
  10. #include "lfn.h"
  11. DWORD
  12. APIENTRY
  13. LongShift(
  14. DWORD dwValue,
  15. WORD wCount
  16. )
  17. {
  18. return (dwValue >> wCount);
  19. }
  20. VOID
  21. APIENTRY
  22. SetDASD(
  23. WORD drive,
  24. BYTE dasdvalue
  25. )
  26. {
  27. // only used by diskette copy.
  28. }
  29. LPDBT
  30. APIENTRY
  31. GetDBT()
  32. {
  33. return (0); // only used by format.
  34. }
  35. VOID
  36. APIENTRY
  37. DiskReset()
  38. {
  39. }
  40. INT
  41. APIENTRY
  42. IsHighCapacityDrive(
  43. WORD iDrive
  44. )
  45. {
  46. return (0); // only use for format and make system diskette.
  47. }
  48. WORD
  49. APIENTRY
  50. GetDPB(
  51. WORD drive,
  52. PDPB pDPB
  53. )
  54. {
  55. return (0); // used by hasSystemFiles() and IsSYSable()
  56. }
  57. VOID
  58. APIENTRY
  59. SetDPB(
  60. WORD drive,
  61. PBPB pBPB,
  62. PDPB pDPB
  63. )
  64. { // only used by Format()
  65. }
  66. INT
  67. APIENTRY
  68. ModifyDPB(
  69. WORD drive
  70. )
  71. {
  72. return (0); // only used by IsSYSAble()
  73. }
  74. INT
  75. APIENTRY
  76. MyInt25(
  77. WORD drive,
  78. LPSTR buffer,
  79. WORD count,
  80. WORD sector
  81. )
  82. {
  83. return (0); // only used for formatting and sys disk
  84. }
  85. INT
  86. APIENTRY
  87. MyReadWriteSector(
  88. LPSTR lpBuffer,
  89. WORD function,
  90. WORD drive,
  91. WORD cylinder,
  92. WORD head,
  93. WORD count
  94. )
  95. {
  96. return (0); // only used by DiskCopy()
  97. }
  98. INT
  99. APIENTRY
  100. FormatTrackHead(
  101. WORD drive,
  102. WORD track,
  103. WORD head,
  104. WORD cSec,
  105. LPSTR lpTrack
  106. )
  107. {
  108. return (0); // only used for formatting
  109. }
  110. INT
  111. APIENTRY
  112. MyGetDriveType(
  113. WORD drive
  114. )
  115. {
  116. return (0); // only used for formatting
  117. }
  118. INT
  119. APIENTRY
  120. WriteBootSector(
  121. WORD srcDrive,
  122. WORD dstDrive,
  123. PBPB pBPB,
  124. LPSTR lpBuf
  125. )
  126. {
  127. return (0); // only used for formatting and syssing.
  128. }
  129. DWORD
  130. APIENTRY
  131. ReadSerialNumber(
  132. INT iDrive,
  133. LPSTR lpBuf
  134. )
  135. {
  136. return (0); // only used for syssing.
  137. }
  138. INT
  139. APIENTRY
  140. ModifyVolLabelInBootSec(
  141. INT iDrive,
  142. LPSTR lpszVolLabel,
  143. DWORD lSerialNo,
  144. LPSTR lpBuf
  145. )
  146. {
  147. return (0); // only used for syssing.
  148. }
  149. /*
  150. * Note: returned value must not be written to or freed
  151. */
  152. LPSTR
  153. GetRootPath(
  154. WORD wDrive
  155. )
  156. {
  157. static CHAR rp[] = "A:\\";
  158. rp[0] = 'A' + wDrive;
  159. return (rp);
  160. }