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.

175 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. CdfsBoot.h
  5. Abstract:
  6. This module defines globally used procedure and data structures used
  7. by Cdfs boot.
  8. Author:
  9. Brian Andrew [BrianAn] 05-Aug-1991
  10. Revision History:
  11. --*/
  12. #ifndef _CDFSBOOT_
  13. #define _CDFSBOOT_
  14. #define MAX_CDROM_READ (16 * CD_SECTOR_SIZE)
  15. typedef struct _CDFS_STRUCTURE_CONTEXT {
  16. //
  17. // The following field is the sector offset of the start of
  18. // directory data.
  19. //
  20. ULONG RootDirSectorOffset;
  21. //
  22. // The following field is the start of the sector containing the
  23. // this directory.
  24. //
  25. ULONG RootDirDiskOffset;
  26. //
  27. // The following field is the size of the directory.
  28. //
  29. ULONG RootDirSize;
  30. //
  31. // The following field is the sector offset of the start of
  32. // directory data.
  33. //
  34. ULONG DirSectorOffset;
  35. //
  36. // The following field is the start of the sector containing the
  37. // this directory.
  38. //
  39. ULONG DirDiskOffset;
  40. //
  41. // The following field is the size of the directory.
  42. //
  43. ULONG DirSize;
  44. //
  45. // The following field indicates the size of the disk Logical Blocks.
  46. //
  47. ULONG LbnBlockSize;
  48. //
  49. // The following field indicates the number of logical blocks on the
  50. // disk.
  51. //
  52. ULONG LogicalBlockCount;
  53. //
  54. // The following indicates whether this is an Iso or Hsg disk.
  55. //
  56. BOOLEAN IsIsoVol;
  57. } CDFS_STRUCTURE_CONTEXT, *PCDFS_STRUCTURE_CONTEXT;
  58. //
  59. // Define Cdfs file context structure.
  60. //
  61. typedef struct _CDFS_FILE_CONTEXT {
  62. //
  63. // The following is the disk offset of the read position for the
  64. // start of the file. This may include the above number of non-file
  65. // bytes.
  66. //
  67. ULONG DiskOffset;
  68. //
  69. // The following field contains the size of the file, in bytes.
  70. //
  71. ULONG FileSize;
  72. //
  73. // The following field indicates whether this is a directory.
  74. //
  75. BOOLEAN IsDirectory;
  76. } CDFS_FILE_CONTEXT, *PCDFS_FILE_CONTEXT;
  77. //
  78. // Define file I/O prototypes.
  79. //
  80. ARC_STATUS
  81. CdfsClose (
  82. IN ULONG FileId
  83. );
  84. ARC_STATUS
  85. CdfsOpen (
  86. IN CHAR * FIRMWARE_PTR OpenPath,
  87. IN OPEN_MODE OpenMode,
  88. OUT ULONG * FIRMWARE_PTR FileId
  89. );
  90. ARC_STATUS
  91. CdfsRead (
  92. IN ULONG FileId,
  93. OUT VOID * FIRMWARE_PTR Buffer,
  94. IN ULONG Length,
  95. OUT ULONG * FIRMWARE_PTR Count
  96. );
  97. ARC_STATUS
  98. CdfsSeek (
  99. IN ULONG FileId,
  100. IN LARGE_INTEGER * FIRMWARE_PTR Offset,
  101. IN SEEK_MODE SeekMode
  102. );
  103. ARC_STATUS
  104. CdfsWrite (
  105. IN ULONG FileId,
  106. IN VOID * FIRMWARE_PTR Buffer,
  107. IN ULONG Length,
  108. OUT ULONG * FIRMWARE_PTR Count
  109. );
  110. ARC_STATUS
  111. CdfsGetFileInformation (
  112. IN ULONG FileId,
  113. OUT FILE_INFORMATION * FIRMWARE_PTR Buffer
  114. );
  115. ARC_STATUS
  116. CdfsSetFileInformation (
  117. IN ULONG FileId,
  118. IN ULONG AttributeFlags,
  119. IN ULONG AttributeMask
  120. );
  121. ARC_STATUS
  122. CdfsInitialize(
  123. VOID
  124. );
  125. #endif // _CDFSBOOT_