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.

128 lines
4.3 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: dfsdata.h
  4. //
  5. // Contents: This module declares the global data used by the
  6. // Dfs file system.
  7. //
  8. // Functions:
  9. //
  10. //-----------------------------------------------------------------------------
  11. #ifndef _DFSDATA_
  12. #define _DFSDATA_
  13. //
  14. // The global FSD data record.
  15. //
  16. extern DFS_DATA DfsData;
  17. //
  18. // The global event logging level
  19. //
  20. extern ULONG DfsEventLog;
  21. //
  22. // The security descriptor used to check access for renames along exit paths
  23. //
  24. extern PSECURITY_DESCRIPTOR SeRenameSd;
  25. #if DBG
  26. #define DEBUG_TRACE_ERROR (0x00000001)
  27. #define DEBUG_TRACE_DEBUG_HOOKS (0x00000002)
  28. #define DEBUG_TRACE_CATCH_EXCEPTIONS (0x00000004)
  29. #define DEBUG_TRACE_UNWIND (0x00000008)
  30. #define DEBUG_TRACE_REGISTRY (0x00000010)
  31. #define DEBUG_TRACE_CLOSE (0x00000020)
  32. #define DEBUG_TRACE_CREATE (0x00000040)
  33. #define DEBUG_TRACE_INIT (0x00000080)
  34. #define DEBUG_TRACE_INSTRUM (0x00000100)
  35. #define DEBUG_TRACE_FILEINFO (0x00000200)
  36. #define DEBUG_TRACE_FSCTRL (0x00000400)
  37. #define DEBUG_TRACE_RTL (0x00000800)
  38. #define DEBUG_TRACE_RESET (0x00001000)
  39. #define DEBUG_TRACE_VOLINFO (0x00002000) // Unused
  40. #define DEBUG_TRACE_WRITE (0x00004000) // Unused
  41. #define DEBUG_TRACE_DEVCTRL (0x00008000) // Unused
  42. #define DEBUG_TRACE_PKT (0x00010000)
  43. #define DEBUG_TRACE_DOTDFS (0x00020000) // Unused
  44. #define DEBUG_TRACE_LOCALVOL (0x00040000)
  45. #define DEBUG_TRACE_DNR (0x00080000) // Unused
  46. #define DEBUG_TRACE_ATTACH (0x00100000)
  47. #define DEBUG_TRACE_FASTIO (0x00200000)
  48. #define DEBUG_TRACE_DIRSUP (0x00400000) // Unused
  49. #define DEBUG_TRACE_FILOBSUP (0x00800000) // Unused
  50. #define DEBUG_TRACE_EVENTLOG (0x01000000)
  51. #define DEBUG_TRACE_LOGROOT (0x02000000) // Unused
  52. #define DEBUG_TRACE_CACHESUP (0x04000000) // Unused
  53. #define DEBUG_TRACE_PREFXSUP (0x08000000)
  54. #define DEBUG_TRACE_DEVIOSUP (0x10000000) // Unused
  55. #define DEBUG_TRACE_STRUCSUP (0x20000000) // Unused
  56. #define DEBUG_TRACE_ROOT_EXPANSION (0x40000000)
  57. #define DEBUG_TRACE_REFERRALS (0x80000000)
  58. extern LONG DfsDebugTraceLevel;
  59. extern LONG DfsDebugTraceIndent;
  60. //+---------------------------------------------------------------------------
  61. // Macro: DebugTrace, public
  62. //
  63. // Synopsis: Conditionally print a debug trace message
  64. //
  65. // Arguments: [Indent] -- Indent to appluy: +1, 0 or -1
  66. // [Level] -- debug trace level
  67. // [Msg] -- Message to be printed, can include one prinf-style
  68. // format effector.
  69. // [Y] -- Value to be printed
  70. //
  71. // Returns: None
  72. //
  73. //----------------------------------------------------------------------------
  74. VOID DfsDebugTracePrint(PCHAR x, PVOID y);
  75. #define DebugTrace(INDENT,LEVEL,X,Y) { \
  76. if (((LEVEL) == 0) || (DfsDebugTraceLevel & (LEVEL))) { \
  77. if ((INDENT) < 0) { \
  78. DfsDebugTraceIndent += (INDENT); \
  79. } \
  80. DfsDebugTracePrint(X, (PVOID)Y); \
  81. if ((INDENT) > 0) { \
  82. DfsDebugTraceIndent += (INDENT); \
  83. } \
  84. } \
  85. }
  86. #else
  87. #define DebugTrace(INDENT,LEVEL,X,Y) {NOTHING;}
  88. #endif // DBG
  89. //+---------------------------------------------------------------------------
  90. // Macro: BugCheck, public
  91. //
  92. // Synopsis: Call DfsBugCheck with invoker's file and line numbers
  93. //
  94. // Arguments: [Msg] -- Optional Message to be printed for debug
  95. // builds
  96. //
  97. // Returns: None
  98. //
  99. //----------------------------------------------------------------------------
  100. #if DBG
  101. VOID DfsBugCheck(CHAR *pszmsg, CHAR *pszfile, ULONG line);
  102. #define BugCheck(sz) DfsBugCheck(sz, __FILE__, __LINE__)
  103. #else
  104. VOID DfsBugCheck(VOID);
  105. #define BugCheck(sz) DfsBugCheck()
  106. #endif
  107. #endif // _DFSDATA_