lfsdata.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef _LFSDATA_
00022
#define _LFSDATA_
00023
00024
00025
00026
00027
00028 extern LFS_DATA LfsData;
00029
00030
00031
00032
00033
00034 #define LfsMaximumFileSize (0x0000000100000000)
00035
00036 extern LARGE_INTEGER
LfsLi0;
00037 extern LARGE_INTEGER
LfsLi1;
00038
00039
00040
00041
00042
00043 extern LSN LfsStartingLsn;
00044
00045
00046
00047
00048
00049
#if !DBG
00050
#ifdef NTFS_FREE_ASSERTS
00051
#undef ASSERT
00052
#undef ASSERTMSG
00053
#define ASSERT(exp) if (!(exp)) { extern BOOLEAN KdDebuggerEnabled; DbgPrint("%s:%d %s\n",__FILE__,__LINE__,#exp); if (KdDebuggerEnabled) { DbgBreakPoint(); } }
00054
#define ASSERTMSG(msg,exp) if (!(exp)) { extern BOOLEAN KdDebuggerEnabled; DbgPrint("%s:%d %s %s\n",__FILE__,__LINE__,msg,#exp); if (KdDebuggerEnabled) { DbgBreakPoint(); } }
00055
#endif
00056
#endif
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
#ifdef LFSDBG
00105
00106
#define DEBUG_TRACE_ERROR (0x00000001)
00107
#define DEBUG_TRACE_DEBUG_HOOKS (0x00000002)
00108
#define DEBUG_TRACE_CATCH_EXCEPTIONS (0x00000004)
00109
#define DEBUG_TRACE_UNWIND (0x00000008)
00110
#define DEBUG_TRACE_INITIALIZATION (0x00000010)
00111
#define DEBUG_TRACE_QUERY (0x00000020)
00112
#define DEBUG_TRACE_WRITE (0x00000040)
00113
#define DEBUG_TRACE_RESTART (0x00000080)
00114
#define DEBUG_TRACE_REGISTRY (0x00000100)
00115
#define DEBUG_TRACE_WORKER (0x00000200)
00116
#define DEBUG_TRACE_0x00000400 (0x00000400)
00117
#define DEBUG_TRACE_0x00000800 (0x00000800)
00118
#define DEBUG_TRACE_LOG_PAGE_SUP (0x00001000)
00119
#define DEBUG_TRACE_LSN_SUP (0x00002000)
00120
#define DEBUG_TRACE_MISC_SUP (0x00004000)
00121
#define DEBUG_TRACE_CACHE_SUP (0x00008000)
00122
#define DEBUG_TRACE_STRUC_SUP (0x00010000)
00123
#define DEBUG_TRACE_VERIFY_SUP (0x00020000)
00124
#define DEBUG_TRACE_SYNCH_SUP (0x00040000)
00125
#define DEBUG_TRACE_LBCB_SUP (0x00080000)
00126
#define DEBUG_TRACE_LOG_RECORD_SUP (0x00100000)
00127
#define DEBUG_TRACE_RESTART_SUP (0x00200000)
00128
#define DEBUG_TRACE_0x00400000 (0x00400000)
00129
#define DEBUG_TRACE_0x00800000 (0x00800000)
00130
#define DEBUG_TRACE_0x01000000 (0x01000000)
00131
#define DEBUG_TRACE_0x02000000 (0x02000000)
00132
#define DEBUG_TRACE_0x04000000 (0x04000000)
00133
#define DEBUG_TRACE_0x08000000 (0x08000000)
00134
#define DEBUG_TRACE_0x10000000 (0x10000000)
00135
#define DEBUG_TRACE_0x20000000 (0x20000000)
00136
#define DEBUG_TRACE_0x40000000 (0x40000000)
00137
#define DEBUG_TRACE_0x80000000 (0x80000000)
00138
00139
extern LONG LfsDebugTraceLevel;
00140
extern LONG LfsDebugTraceIndent;
00141
00142
#define DebugTrace(INDENT,LEVEL,X,Y) { \
00143
LONG _i; \
00144
if (((LEVEL) == 0) || (LfsDebugTraceLevel & (LEVEL))) { \
00145
_i = (ULONG)PsGetCurrentThread(); \
00146
DbgPrint("%08lx:",_i); \
00147
if ((INDENT) < 0) { \
00148
LfsDebugTraceIndent += (INDENT); \
00149
} \
00150
if (LfsDebugTraceIndent < 0) { \
00151
LfsDebugTraceIndent = 0; \
00152
} \
00153
for (_i = 0; _i < LfsDebugTraceIndent; _i += 1) { \
00154
DbgPrint(" "); \
00155
} \
00156
DbgPrint(X,Y); \
00157
if ((INDENT) > 0) { \
00158
LfsDebugTraceIndent += (INDENT); \
00159
} \
00160
} \
00161
}
00162
00163
#define DebugDump(STR,LEVEL,PTR) { \
00164
ULONG _i; \
00165
VOID LfsDump(); \
00166
if (((LEVEL) == 0) || (LfsDebugTraceLevel & (LEVEL))) { \
00167
_i = (ULONG)PsGetCurrentThread(); \
00168
DbgPrint("%08lx:",_i); \
00169
DbgPrint(STR); \
00170
if (PTR != NULL) {LfsDump(PTR);} \
00171
DbgBreakPoint(); \
00172
} \
00173
}
00174
00175
#define DebugUnwind(X) { \
00176
if (AbnormalTermination()) { \
00177
DebugTrace(0, DEBUG_TRACE_UNWIND, #X ", Abnormal termination.\n", 0); \
00178
} \
00179
}
00180
00181
#define DebugDoit(X) {X;}
00182
00183
#else
00184
00185 #define DebugTrace(INDENT,LEVEL,X,Y) {NOTHING;}
00186 #define DebugDump(STR,LEVEL,PTR) {NOTHING;}
00187 #define DebugUnwind(X) {NOTHING;}
00188 #define DebugDoit(X) {NOTHING;}
00189
00190
#endif // LFSDBG
00191
00192
#endif // _LFSDATA_
00193
Generated on Sat May 15 19:40:38 2004 for test by
1.3.7