Windows NT 4.0 source code leak
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.

210 lines
3.9 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. EtfsBoot.h
  5. Abstract:
  6. This module defines globally used procedure and data structures used
  7. by Etfs boot.
  8. Author:
  9. Steve Collins [stevec] 25-Nov-1995
  10. Revision History:
  11. --*/
  12. #if defined(ELTORITO)
  13. #ifndef _ETFSBOOT_
  14. #define _ETFSBOOT_
  15. //
  16. // The following constants are values from the disk.
  17. //
  18. #define ELTORITO_VD_SECTOR (16)
  19. #define ELTORITO_BRVD_SECTOR (17)
  20. #define ET_SYS_ID "EL TORITO SPECIFICATION"
  21. #define BRVD_VERSION_1 (1)
  22. #define VD_BOOTREC (0)
  23. typedef struct _RAW_ET_BRVD {
  24. UCHAR BrIndicator; // boot record indicator = 0
  25. UCHAR StandardId[5]; // volume structure standard id = "CD001"
  26. UCHAR Version; // descriptor version number = 1
  27. UCHAR BootSysId[32]; // boot system identifier = "EL TORITO SPECIFICATION"
  28. UCHAR Unused1[32]; // unused = 0
  29. ULONG BootCatPtr; // absolute pointer to first sector of boot catalog
  30. UCHAR Reserved[1973]; // unused = 0
  31. } RAW_ET_BRVD;
  32. typedef RAW_ET_BRVD *PRAW_ET_BRVD;
  33. //
  34. // The following macros are used to recover data from the different
  35. // volume descriptor structures.
  36. //
  37. #define RBRVD_BR_IND( r ) ( r->BrIndicator )
  38. #define RBRVD_STD_ID( r ) ( r->StandardId )
  39. #define RBRVD_VERSION( r ) ( r->Version )
  40. #define RBRVD_SYS_ID( r ) ( r->BootSysId )
  41. typedef struct _ETFS_STRUCTURE_CONTEXT {
  42. //
  43. // The following field is the sector offset of the start of
  44. // directory data.
  45. //
  46. ULONG RootDirSectorOffset;
  47. //
  48. // The following field is the start of the sector containing the
  49. // this directory.
  50. //
  51. ULONG RootDirDiskOffset;
  52. //
  53. // The following field is the size of the directory.
  54. //
  55. ULONG RootDirSize;
  56. //
  57. // The following field is the sector offset of the start of
  58. // directory data.
  59. //
  60. ULONG DirSectorOffset;
  61. //
  62. // The following field is the start of the sector containing the
  63. // this directory.
  64. //
  65. ULONG DirDiskOffset;
  66. //
  67. // The following field is the size of the directory.
  68. //
  69. ULONG DirSize;
  70. //
  71. // The following field indicates the size of the disk Logical Blocks.
  72. //
  73. ULONG LbnBlockSize;
  74. //
  75. // The following field indicates the number of logical blocks on the
  76. // disk.
  77. //
  78. ULONG LogicalBlockCount;
  79. //
  80. // The following indicates whether this is an Iso or Hsg disk.
  81. //
  82. BOOLEAN IsIsoVol;
  83. } ETFS_STRUCTURE_CONTEXT, *PETFS_STRUCTURE_CONTEXT;
  84. //
  85. // Define Etfs file context structure.
  86. //
  87. typedef struct _ETFS_FILE_CONTEXT {
  88. //
  89. // The following is the disk offset of the read position for the
  90. // start of the file. This may include the above number of non-file
  91. // bytes.
  92. //
  93. ULONG DiskOffset;
  94. //
  95. // The following field contains the size of the file, in bytes.
  96. //
  97. ULONG FileSize;
  98. //
  99. // The following field indicates whether this is a directory.
  100. //
  101. BOOLEAN IsDirectory;
  102. } ETFS_FILE_CONTEXT, *PETFS_FILE_CONTEXT;
  103. //
  104. // Define file I/O prototypes.
  105. //
  106. ARC_STATUS
  107. EtfsClose (
  108. IN ULONG FileId
  109. );
  110. ARC_STATUS
  111. EtfsOpen (
  112. IN PCHAR OpenPath,
  113. IN OPEN_MODE OpenMode,
  114. OUT PULONG FileId
  115. );
  116. ARC_STATUS
  117. EtfsRead (
  118. IN ULONG FileId,
  119. OUT PVOID Buffer,
  120. IN ULONG Length,
  121. OUT PULONG Count
  122. );
  123. ARC_STATUS
  124. EtfsSeek (
  125. IN ULONG FileId,
  126. IN PLARGE_INTEGER Offset,
  127. IN SEEK_MODE SeekMode
  128. );
  129. ARC_STATUS
  130. EtfsWrite (
  131. IN ULONG FileId,
  132. IN PVOID Buffer,
  133. IN ULONG Length,
  134. OUT PULONG Count
  135. );
  136. ARC_STATUS
  137. EtfsGetFileInformation (
  138. IN ULONG FileId,
  139. OUT PFILE_INFORMATION Buffer
  140. );
  141. ARC_STATUS
  142. EtfsSetFileInformation (
  143. IN ULONG FileId,
  144. IN ULONG AttributeFlags,
  145. IN ULONG AttributeMask
  146. );
  147. ARC_STATUS
  148. EtfsInitialize(
  149. VOID
  150. );
  151. #endif // _ETFSBOOT_
  152. #endif