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.

207 lines
4.1 KiB

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