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.

164 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. RawProcs.h
  5. Abstract:
  6. This module defines all of the globally used procedures in the Raw
  7. file system.
  8. Author:
  9. David Goebel [DavidGoe] 18-Mar-91
  10. Revision History:
  11. --*/
  12. #ifndef _RAWPROCS_
  13. #define _RAWPROCS_
  14. #include <string.h>
  15. #include <ntos.h>
  16. #include <zwapi.h>
  17. #include <FsRtl.h>
  18. #include <ntdddisk.h>
  19. #include "nodetype.h"
  20. #include "RawStruc.h"
  21. //
  22. // This is the main entry point to the Raw File system.
  23. //
  24. NTSTATUS
  25. RawDispatch (
  26. IN PVOLUME_DEVICE_OBJECT VolumeDeviceObject,
  27. IN PIRP Irp
  28. );
  29. //
  30. // MAJOR FUNCTIONS
  31. //
  32. // These routines are called by RawDispatch via the I/O system via the
  33. // dispatch table in the Driver Object. If the status returned is not
  34. // STATUS_PENDING, the Irp will be complete with this status.
  35. //
  36. NTSTATUS
  37. RawCleanup ( // implemented in Cleanup.c
  38. IN PVCB Vcb,
  39. IN PIRP Irp,
  40. IN PIO_STACK_LOCATION IrpSp
  41. );
  42. NTSTATUS
  43. RawClose ( // implemented in Close.c
  44. IN PVCB Vcb,
  45. IN PIRP Irp,
  46. PIO_STACK_LOCATION IrpSp
  47. );
  48. NTSTATUS
  49. RawCreate ( // implemented in Create.c
  50. IN PVCB Vcb,
  51. IN PIRP Irp,
  52. PIO_STACK_LOCATION IrpSp
  53. );
  54. NTSTATUS
  55. RawFileSystemControl ( // implemented in FsCtrl.c
  56. IN PVCB Vcb,
  57. IN PIRP Irp,
  58. PIO_STACK_LOCATION IrpSp
  59. );
  60. NTSTATUS
  61. RawReadWriteDeviceControl ( // implemented in ReadWrit.c
  62. IN PVCB Vcb,
  63. IN PIRP Irp,
  64. PIO_STACK_LOCATION IrpSp
  65. );
  66. NTSTATUS
  67. RawQueryInformation ( // implemented in FileInfo.c
  68. IN PVCB Vcb,
  69. IN PIRP Irp,
  70. PIO_STACK_LOCATION IrpSp
  71. );
  72. NTSTATUS
  73. RawSetInformation ( // implemented in FileInfo.c
  74. IN PVCB Vcb,
  75. IN PIRP Irp,
  76. PIO_STACK_LOCATION IrpSp
  77. );
  78. NTSTATUS
  79. RawQueryVolumeInformation ( // implemented in VolInfo.c
  80. IN PVCB Vcb,
  81. IN PIRP Irp,
  82. PIO_STACK_LOCATION IrpSp
  83. );
  84. //
  85. // Miscellaneous support routines
  86. //
  87. //
  88. // Completion routine for read, write, and device control to deal with
  89. // verify issues. Implemented in RawDisp.c
  90. //
  91. NTSTATUS
  92. RawCompletionRoutine(
  93. IN PDEVICE_OBJECT DeviceObject,
  94. IN PIRP Irp,
  95. IN PVOID Context
  96. );
  97. //
  98. // In-memory structure support routines, implemented in StrucSup.c
  99. //
  100. NTSTATUS
  101. RawInitializeVcb (
  102. IN OUT PVCB Vcb,
  103. IN PDEVICE_OBJECT TargetDeviceObject,
  104. IN PVPB Vpb
  105. );
  106. BOOLEAN
  107. RawCheckForDismount (
  108. PVCB Vcb,
  109. BOOLEAN CalledFromCreate
  110. );
  111. //
  112. // This macro returns TRUE if a flag in a set of flags is on and FALSE
  113. // otherwise
  114. //
  115. #define FlagOn(Flags,SingleFlag) ( \
  116. (BOOLEAN)(((Flags) & (SingleFlag)) != 0 ? TRUE : FALSE) \
  117. )
  118. //
  119. // This macro completes a request
  120. //
  121. #define RawCompleteRequest(IRP,STATUS) { \
  122. \
  123. (IRP)->IoStatus.Status = (STATUS); \
  124. \
  125. IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
  126. }
  127. #endif // _RAWPROCS_