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.

143 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. verfysup.c
  5. Abstract:
  6. This module implements the verify functions for MSFS.
  7. Author:
  8. Manny Weiser (mannyw) 23-Jan-1991
  9. Revision History:
  10. --*/
  11. #include "mailslot.h"
  12. //
  13. // The debug trace level
  14. //
  15. #define Dbg (DEBUG_TRACE_VERIFY)
  16. #ifdef ALLOC_PRAGMA
  17. #pragma alloc_text( PAGE, MsVerifyCcb )
  18. #pragma alloc_text( PAGE, MsVerifyFcb )
  19. #pragma alloc_text( PAGE, MsVerifyDcbCcb )
  20. #endif
  21. NTSTATUS
  22. MsVerifyFcb (
  23. IN PFCB Fcb
  24. )
  25. /*++
  26. Routine Description:
  27. This function verifies that an FCB is still active. If it is active,
  28. the function does nothing. If it is inactive an error status is returned.
  29. Arguments:
  30. PFCB - A pointer to the FCB to verify.
  31. Return Value:
  32. None.
  33. --*/
  34. {
  35. PAGED_CODE();
  36. DebugTrace(+1, Dbg, "MsVerifyFcb, Fcb = %08lx\n", (ULONG)Fcb);
  37. if ( Fcb->Header.NodeState != NodeStateActive ) {
  38. DebugTrace( 0, Dbg, "Fcb is not active\n", 0);
  39. return STATUS_FILE_INVALID;
  40. }
  41. DebugTrace(-1, Dbg, "MsVerifyFcb -> VOID\n", 0);
  42. return STATUS_SUCCESS;
  43. }
  44. NTSTATUS
  45. MsVerifyCcb (
  46. IN PCCB Ccb
  47. )
  48. /*++
  49. Routine Description:
  50. This function verifies that a CCB is still active. If it is active,
  51. the function does nothing. If it is inactive an error status is raised.
  52. Arguments:
  53. PCCB - A pointer to the CCB to verify.
  54. Return Value:
  55. None.
  56. --*/
  57. {
  58. PAGED_CODE();
  59. DebugTrace(+1, Dbg, "MsVerifyCcb, Ccb = %08lx\n", (ULONG)Ccb);
  60. if ( Ccb->Header.NodeState != NodeStateActive ) {
  61. DebugTrace( 0, Dbg, "Ccb is not active\n", 0);
  62. return STATUS_FILE_INVALID;
  63. }
  64. DebugTrace(-1, Dbg, "MsVerifyCcb -> VOID\n", 0);
  65. return STATUS_SUCCESS;
  66. }
  67. NTSTATUS
  68. MsVerifyDcbCcb (
  69. IN PROOT_DCB_CCB Ccb
  70. )
  71. /*++
  72. Routine Description:
  73. This function verifies that a CCB is still active. If it is active,
  74. the function does nothing. If it is inactive an error status is raised.
  75. Arguments:
  76. PCCB - A pointer to the DCB CCB to verify.
  77. Return Value:
  78. None.
  79. --*/
  80. {
  81. PAGED_CODE();
  82. DebugTrace(+1, Dbg, "MsVerifyCcb, Ccb = %08lx\n", (ULONG)Ccb);
  83. if ( Ccb->Header.NodeState != NodeStateActive ) {
  84. DebugTrace( 0, Dbg, "Ccb is not active\n", 0);
  85. return STATUS_FILE_INVALID;
  86. }
  87. DebugTrace(-1, Dbg, "MsVerifyCcb -> VOID\n", 0);
  88. return STATUS_SUCCESS;
  89. }